23#include "os/os_error.h"
33#define OS_TICKS_PER_SEC (MS_PER_SEC)
MAYBE_INLINE bool irq_is_in(void)
Check whether called from interrupt service routine.
static void ztimer_spin(ztimer_clock_t *clock, uint32_t duration)
Busy-wait specified duration.
static ztimer_now_t ztimer_now(ztimer_clock_t *clock)
Get the current time from a clock.
void ztimer_sleep(ztimer_clock_t *clock, uint32_t duration)
Put the calling thread to sleep for the specified number of ticks.
ztimer_clock_t *const ZTIMER_MSEC
Default ztimer millisecond clock.
static os_time_t os_time_ms_to_ticks32(uint32_t ms)
Converts the given number of milliseconds into cputime ticks.
static os_time_t os_time_get(void)
Returns the low 32 bits of cputime.
static void os_time_delay(os_time_t ticks)
Wait until the number of ticks has elapsed, BLOICKING.
static os_time_t os_time_ticks_to_ms32(os_time_t ticks)
Convert the given number of ticks into milliseconds.
static os_error_t os_time_ticks_to_ms(os_time_t ticks, uint32_t *out_ms)
Convert the given number of ticks into milliseconds.
static os_error_t os_time_ms_to_ticks(uint32_t ms, os_time_t *out_ticks)
Converts the given number of milliseconds into cputime ticks.
uint32_t os_time_t
time type