|
static Tick * | get_instance (void) noexcept |
| Get the global instance of the timer system.
|
|
static void | init (void) noexcept |
| Initialize the low level timer manager.
|
|
static void | shutdown (void) noexcept |
| Shut down the low level timer manager.
|
|
static uint64_t | get_high_precision_frequency (void) noexcept |
| Get the frequency of the high precision timer.
|
|
static uint_t | is_initialized (void) noexcept |
| Check if the timer manager is initialized.
|
|
static uint64_t | read_high_precision (void) noexcept |
| Return the tick at the system's highest precision.
|
|
static uint32_t | read (void) noexcept |
| Retrieve the 60 hertz timer system time.
|
|
static uint32_t | read_ms (void) noexcept |
| Retrieve the 1Khz timer.
|
|
static uint32_t | read_us (void) noexcept |
| Retrieve the 1Mhz timer.
|
|
static uint32_t | read_and_mark (void) noexcept |
| Sync the 60 hertz timer.
|
|
static uint32_t | get_mark (void) noexcept |
| Get the 60 hertz timer sync value.
|
|
static void | wait_one_tick (void) noexcept |
| Sleep for a maximum of 1/60th of a second.
|
|
static void | wait (uint_t uCount=1) noexcept |
| Wait for a number of system ticks.
|
|
static uint_t | wait_event (uint_t uCount=0) noexcept |
| Sleep until a timeout or until a user input event.
|
|
Low level timer manager.
Upon this class being started up, a global 60 hertz timer is created and via a background interrupt, it will increment 60 times a second. This is global and shared by all threads. The timer cannot stop.
The value can be zero for 1/60th of a second, so do not assume that a zero is an uninitialized state.
In addition to starting up this timer, higher precision timers are initialized so ticks accurate to milliseconds, microseconds and system precision.
- Note
- : The timer will wrap around 2 years. Do not assume it will not wrap around.
- See also
- read(), read_ms(), read_us() or FloatTimer
Retrieve the 60 hertz timer system time.
When init() is called, a 60 hertz timer is created and via a background interrupt or other means, will increment 60 times a second.
The value can be zero for 1/60th of a second, so do not assume that a zero is an uninitialized state.
- Returns
- 32 bit time value that increments 60 times a second
- See also
- read_and_mark()
uint32_t BURGER_API Burger::Tick::read_us |
( |
void | | ) |
|
|
staticnoexcept |
Retrieve the 1Mhz timer.
Upon application start up, a 1Mhz hertz timer is created and via a hardward timer, it will increment 1Mhz times a second.
The value can be zero for 1/1,000,000th of a second, so do not assume that a zero is an uninitialized state.
- Note
- Due to hardware limitations, do NOT assume this timer is accurate to 1/1,000,000th of a second. The granularity could be much courser, however, it will be incrementing at a rate to remain in sync to 1,000,000 ticks a second.
- Returns
- 32 bit time value that increments at 1Mhz
- See also
- read() or read_ms()