oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
Loading...
Searching...
No Matches
Macros | Functions
time.h File Reference
#include "ove/types.h"
#include "ove_config.h"
Include dependency graph for time.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OVE_NS(n)   ((uint64_t)(n))
 
#define OVE_US(n)   ((uint64_t)(n) * 1000ULL)
 
#define OVE_MS(n)   ((uint64_t)(n) * 1000000ULL)
 
#define OVE_SEC(n)   ((uint64_t)(n) * 1000000000ULL)
 
#define OVE_MIN(n)   (OVE_SEC(n) * 60ULL)
 

Functions

int ove_time_get_us (uint64_t *out)
 Get the current monotonic time in microseconds.
 
int ove_time_get_ns (uint64_t *out)
 Get the current monotonic time in nanoseconds.
 
void ove_time_delay_ms (uint32_t ms)
 Block the calling task for at least ms milliseconds.
 
void ove_time_delay_us (uint32_t us)
 Block the calling task for at least us microseconds.
 
static uint64_t ove_time_now_steady_ns (void)
 Get the current monotonic time in nanoseconds (value-return form).
 
static uint64_t ove_time_deadline_to_timeout_ns (uint64_t deadline_ns)
 Convert a steady-clock deadline to a duration suitable for the existing timeout_ns-taking APIs.