High-precision hardware timer with DVU-accelerated conversions.
The Timer class provides Sega Saturn game developers with precise, hardware-accelerated timing capabilities. It combines the SH-2's FRT (Free Running Timer) for counting and DVU (Division Unit) for fast fixed-point conversions.
| Tick Rate | Precision | Hardware Max |
|---|---|---|
| ~222 kHz | ~4.47 μs | ~673 days |
#include <srl_timer.hpp>
Static Public Member Functions | |
Timing State | |
Pre-calculated timing values for frame-rate independent operations. | |
| static const Tickstamp & | DeltaTicks () noexcept |
| Frame delta ticks (raw elapsed ticks between frames). | |
| static const Tickstamp & | CurrentTickstamp () noexcept |
| Current frame timestamp (const reference). | |
| static const Math::Types::Fxp & | DeltaSeconds () noexcept |
| Frame delta time in seconds (fixed-point 16.16). | |
| static const Math::Types::Fxp & | DeltaMilliseconds () noexcept |
| Frame delta time in milliseconds (fixed-point 16.16). | |
| static const Math::Types::Fxp & | DeltaMinutes () noexcept |
| Frame delta time in minutes (fixed-point 16.16). | |
Core Operations | |
Fundamental timer operations for frame updates and timestamp capture. | |
| static Tickstamp | Capture () noexcept |
| Captures current hardware state into a Tickstamp. | |