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.

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

1 Answer 1


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.


You must log in to answer this question.

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