Zephyr C++ Toolkit
Loading...
Searching...
No Matches
zct::Util Class Reference

#include <Util.hpp>

Static Public Member Functions

static void sleepUntilSystemTime (int64_t targetTimeMs)
 

Member Function Documentation

◆ sleepUntilSystemTime()

static void zct::Util::sleepUntilSystemTime ( int64_t  targetTimeMs)
inlinestatic

Sleep until the system time is equal to or greater than the target time. This is useful in testing when we want to sleep until a specific absolute time, rather than a relative time as per k_sleep(K_MSEC(...)). Uses k_sleep() to sleep.

Typical use would be:

int64_t startTimeMs = k_uptime_get();
zct::Util::sleepUntilSystemTime(startTimeMs + 1000);
static void sleepUntilSystemTime(int64_t targetTimeMs)
Definition Util.hpp:24
Parameters
targetTimeMsThe target time (as a system time in milliseconds) to sleep until.

The documentation for this class was generated from the following file: