Timing related functions.
More...
Timing related functions.
◆ sys_current_ms()
uint32_t sys_current_ms |
( |
| ) |
|
Get current millisecond.
- Returns
- Current millisecond
◆ sys_tick_count()
uint32_t sys_tick_count |
( |
| ) |
|
Get current tick count.
- Returns
- Current tick count
Note that system is usually built that one tick corresponds to one millisecond. Thus, sys_current_ms() returns the same value as this function.
◆ sys_timer_active()
int sys_timer_active |
( |
int |
timer_ix | ) |
|
Check timer running status.
- Parameters
-
- Returns
- (0/1) 1 - timer is running
◆ sys_timer_disable()
void sys_timer_disable |
( |
int |
timer_ix | ) |
|
Disables system timer.
- Parameters
-
◆ sys_timer_start()
void sys_timer_start |
( |
int |
timer_ix, |
|
|
uint32_t |
ms_value |
|
) |
| |
Starts system timer (non-periodic pooling timer)
- Parameters
-
timer_ix | Timer index |
ms_value | Timeout value (milliseconds) |
◆ sys_timer_timeout()
int sys_timer_timeout |
( |
int |
timer_ix | ) |
|
Check for timer timeout.
- Returns
- (0/1) 1 - timer expired