mynewt-core time abstraction
More...
#include "os/os_error.h"
#include "ztimer.h"
Go to the source code of this file.
◆ OS_TICKS_PER_SEC
Ticks per seconds, ztimer_msec is used as system timer.
Definition at line 33 of file os_time.h.
◆ os_time_delay()
Wait until the number of ticks has elapsed, BLOICKING.
- Parameters
-
[in] | ticks | The number of ticks to wait. |
Definition at line 102 of file os_time.h.
◆ os_time_get()
Returns the low 32 bits of cputime.
- Returns
- uint32_t The lower 32 bits of cputime
Definition at line 40 of file os_time.h.
◆ os_time_ms_to_ticks()
static os_error_t os_time_ms_to_ticks |
( |
uint32_t |
ms, |
|
|
os_time_t * |
out_ticks |
|
) |
| |
|
inlinestatic |
Converts the given number of milliseconds into cputime ticks.
- Parameters
-
[in] | ms | The number of milliseconds to convert to ticks |
[out] | out_ticks | The number of ticks corresponding to 'ms' |
- Returns
- os_error_t OS_OK - no error
Definition at line 53 of file os_time.h.
◆ os_time_ms_to_ticks32()
static os_time_t os_time_ms_to_ticks32 |
( |
uint32_t |
ms | ) |
|
|
inlinestatic |
Converts the given number of milliseconds into cputime ticks.
- Parameters
-
[in] | ms | The number of milliseconds to convert to ticks |
- Returns
- uint32_t The number of ticks corresponding to 'ms'
Definition at line 80 of file os_time.h.
◆ os_time_ticks_to_ms()
static os_error_t os_time_ticks_to_ms |
( |
os_time_t |
ticks, |
|
|
uint32_t * |
out_ms |
|
) |
| |
|
inlinestatic |
Convert the given number of ticks into milliseconds.
- Parameters
-
[in] | ticks | The number of ticks to convert to milliseconds. |
[out] | out_ms | The converted milliseconds from 'ticks' |
- Returns
- os_error_t OS_OK - no error
Definition at line 67 of file os_time.h.
◆ os_time_ticks_to_ms32()
Convert the given number of ticks into milliseconds.
- Parameters
-
[in] | ticks | The number of ticks to convert to milliseconds. |
- Returns
- uint32_t The number of milliseconds corresponding to 'ticks'
Definition at line 92 of file os_time.h.