SaturnRingLibrary 0.9.2
SGL wrapper
Loading...
Searching...
No Matches

◆ DeltaMilliseconds()

const Math::Types::Fxp & SRL::Timer::DeltaMilliseconds ( )
inlinestaticnoexcept

Frame delta time in milliseconds (fixed-point 16.16).

Pre-calculated each frame by Core::Synchronize(). Represents the time elapsed between frames in milliseconds with higher resolution than seconds.

Range:
  • Typical 60fps: ~16.7 milliseconds
  • Typical 30fps: ~33.3 milliseconds
  • Fxp limit: 32767 milliseconds (~32.8 seconds)
Usage:
Use when you need millisecond precision for short-duration events, input debouncing, or animation keyframe timing.
// Check if enough time has passed for input repeat
if (Timer::DeltaMilliseconds().As<int>() > 100) { // 100ms elapsed
// Process repeating input
}
static const Math::Types::Fxp & DeltaMilliseconds() noexcept
Frame delta time in milliseconds (fixed-point 16.16).
Definition srl_timer.hpp:1011
Warning
The 32767ms limit (~32.8s) is the Fxp format limit. The hardware timer itself can track up to ~673 days (PHI_128). For measuring longer durations than 32.8s, use DeltaSeconds() instead.
See also
DeltaSeconds() for longer range (up to 9.1 hours in Fxp)