sleepForUs#

Fully qualified name: carb::this_thread::sleepForUs

Defined in carb/thread/Util.h

inline void carb::this_thread::sleepForUs(
uint32_t microseconds,
) noexcept#

A simple sleep for the current thread that does not include the overhead of std::chrono.

Note

The carb::cpp::this_thread::sleep_for and carb::cpp::this_thread::sleep_until functions make strong guarantees that they sleep at least as long as requested. This function directly calls the underlying kernel sleep function (Sleep or NtDelayExecution on Windows and nanosleep on POSIX) and only provides the guarantees of the kernel functions.

Parameters:

microseconds – The number of microseconds to sleep for.