sleep_until#
Fully qualified name: carb::cpp::this_thread::sleep_until
Defined in carb/cpp/Thread.h
-
template<class Clock, class Duration>
void carb::cpp::this_thread::sleep_until(
)# Blocks the execution of the current thread until at least the specified time.
This function may block for longer than
when
due to scheduling or resource contention delays. Uses a monotonic clock to measure duration.Warning
MSVC versions prior to 2022 17.9 have a bug where the system clock is used instead of a monotonic clock. This function does not have the issue as long as the
when
parameter is in terms of a monotonic clock. If a wall-clock time is used, it is converted to a monotonic clock, but the conversion is subject to system clock adjustments.- Parameters:
when – The time point to wait until.