0
\$\begingroup\$

I'm studying time stepping algorithm and I need to know how delta time works in libgdx, because I think delta time uses some kind of time stepping algorithm.

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Did you take a look at the source? \$\endgroup\$
    – Vaillancourt
    Jan 9, 2017 at 15:41

1 Answer 1

1
\$\begingroup\$

libgdx seems, based on the source, to compute delta time with some variant of

long time = System.nanoTime();
deltaTime = (time - lastFrameTime) / 1000000000.0f;
lastFrameTime = time;

for every back-end renderer implementation. This is usually done when the renderer is ticked (the view is drawn, effectively). There doesn't appear to be any time-stepping going on.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .