Public Member Functions | |
| void | init (uint32_t uDesiredRate) noexcept |
| Constuctor. | |
| uint32_t | read (void) noexcept |
| Read a tick value at the desired scale. | |
Public Attributes | |
| uint64_t | m_uMark |
| Time mark for scaled hertz tick. | |
| uint64_t | m_uDelta |
| Pending time delta tick. | |
| uint32_t | m_uTick |
| Current tick. | |
| uint32_t | m_uDesiredRate |
| Desired tick rate 60, 1000, 1000000. | |
|
noexcept |
Constuctor.
Initialize the scaler with the desired tick rate in ticks per second. Any value but zero can be used.
| uDesiredRate | Number of ticks per second to scale to |
|
noexcept |
Read a tick value at the desired scale.
Read a high precision timer and through some math magic, convert it to the desired tick rate in ticks per second. The code is accurate and handles a full 32 bit range of values.
| uint64_t Burger::Tick::Scaler_t::m_uDelta |
Pending time delta tick.
| uint32_t Burger::Tick::Scaler_t::m_uDesiredRate |
Desired tick rate 60, 1000, 1000000.
| uint64_t Burger::Tick::Scaler_t::m_uMark |
Time mark for scaled hertz tick.
| uint32_t Burger::Tick::Scaler_t::m_uTick |
Current tick.