Provides support for reading the system time.
◆ mmosal_get_time_ms()
| uint32_t mmosal_get_time_ms |
( |
void |
| ) |
|
◆ mmosal_get_time_ticks()
| uint32_t mmosal_get_time_ticks |
( |
void |
| ) |
|
◆ mmosal_ticks_per_second()
| uint32_t mmosal_ticks_per_second |
( |
void |
| ) |
|
Get the number of ticks in a second.
- Returns
- the number of ticks in a second.
◆ mmosal_time_has_passed()
| static bool mmosal_time_has_passed |
( |
uint32_t |
t | ) |
|
|
inlinestatic |
Check if the given time has already passed.
i.e the system time is greater than the given time.
- Parameters
-
- Returns
true if the given time has passed, else false.
Definition at line 725 of file mmosal.h.
◆ mmosal_time_le()
| static bool mmosal_time_le |
( |
uint32_t |
a, |
|
|
uint32_t |
b |
|
) |
| |
|
inlinestatic |
Check if time a is less than or equal to time b, taking into account wrapping.
| a | b | return |
| 0 | 0 | true |
| 0 | 1 | true |
| 1 | 0 | false |
0xffffffff | 0 | true |
| 0 | 0xffffffff | false |
- Parameters
-
- Returns
- true if time a <= time b.
Definition at line 685 of file mmosal.h.
◆ mmosal_time_lt()
| static bool mmosal_time_lt |
( |
uint32_t |
a, |
|
|
uint32_t |
b |
|
) |
| |
|
inlinestatic |
Check if time a is less than time b, taking into account wrapping.
| a | b | return |
| 0 | 0 | false |
| 0 | 1 | true |
| 1 | 0 | false |
0xffffffff | 0 | true |
| 0 | 0xffffffff | false |
- Parameters
-
- Returns
- true if time a < time b.
Definition at line 662 of file mmosal.h.
◆ mmosal_time_max()
| static uint32_t mmosal_time_max |
( |
uint32_t |
a, |
|
|
uint32_t |
b |
|
) |
| |
|
inlinestatic |
Given two times, return the one that is greatest (taking into account wrapping).
| a | b | return |
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
0xffffffff | 0 | 0 |
| 0 | 0xffffffff | 0 |
- Parameters
-
- Returns
- a if time a >= time b else b.
Definition at line 706 of file mmosal.h.