What problem does it solve?
Provides a simple, reliable interface to read and manage time in Love2D games, enabling accurate delta time, frame rate control, and timing-based logic.
Core Features & Use Cases
- GetDelta: read the time between frames for frame-rate independent movement.
- GetFPS: monitor current frames per second for performance tuning.
- GetTime: obtain an absolute time reference for elapsed measurements.
- GetAverageDelta and Step: measure and update time statistics for profiling and animation pacing.
- Sleep: pause execution for a given time to throttle loops or sync with external events.
Quick Start
Use the love-timer by calling its functions in your Love2D callbacks. For example, in love.update(dt) read local delta = love.timer.getDelta() and use love.timer.getFPS() to adapt rendering or animations.