- Scalar newTicks = Timer::getTicks();
- deltaTime = newTicks - ticksNow;
- ticksNow = newTicks;
-
- // don't slow the animation until 4Hz, which is unplayable anyway
- if (deltaTime >= 0.25) deltaTime = 0.25;
- accumulator += deltaTime;
-
- Timer::fireIfExpired(ticksNow);