# What is the formula or algorithm used in libgdx delta time?

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.

• Did you take a look at the source? – Vaillancourt Jan 9 '17 at 15:41

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.