Timers with a single OS tick precision. Can only be used when the scheduler is running.
◆ coarse_timer_create()
| CoarseTimer FURI_WARN_UNUSED coarse_timer_create |
( |
uint32_t | timeout_ms | ) |
|
Create a coarse timer with the designated timeout.
- Note
- Passing 0 as
timeout_ms will cause the timer to expire immediately
- Parameters
-
| [in] | timeout_ms | timeout value, in milliseconds |
- Returns
- initialised CoarseTimer object
◆ coarse_timer_get_elapsed()
| uint32_t coarse_timer_get_elapsed |
( |
const CoarseTimer | timer | ) |
|
Get the time elapsed since the timer creation, in milliseconds.
- Parameters
-
| [in] | timer | coarse timer object to query |
- Returns
- time elapsed since the timer creation, in milliseconds
◆ coarse_timer_is_expired()
| bool coarse_timer_is_expired |
( |
const CoarseTimer | timer | ) |
|
Check whether a coarse timer is past its timeout.
- Parameters
-
| [in] | timer | coarse timer object to check |
- Returns
true if the timeout has passed, false otherwise