|
PebbleOS
|
Monotonic time since the scheduler started, and the CPU cycle counter. More...
Functions | |
| uint64_t | pbl_uptime_ticks (void) |
| Get the time since the scheduler started, in ticks. | |
| uint64_t | pbl_uptime_ms (void) |
| Get the time since the scheduler started, in milliseconds. | |
| static uint32_t | pbl_cycle_get_32 (void) |
| Read the CPU cycle counter. | |
| uint32_t | pbl_cycles_per_sec (void) |
| Get the rate of the CPU cycle counter. | |
Monotonic time since the scheduler started, and the CPU cycle counter.
Uptime counts kernel ticks, including those spent in tickless sleep, in 64 bits so it never wraps. The cycle counter is for short, precise measurements: it is 32 bits wide, its rate follows the CPU clock and it may stop while the CPU sleeps.
|
static |
Read the CPU cycle counter.
Privileged only. Wraps around; compare differences, not absolute values.
| uint32_t pbl_cycles_per_sec | ( | void | ) |
Get the rate of the CPU cycle counter.
| uint64_t pbl_uptime_ms | ( | void | ) |
Get the time since the scheduler started, in milliseconds.
| uint64_t pbl_uptime_ticks | ( | void | ) |
Get the time since the scheduler started, in ticks.