sleep_for#
Fully qualified name: carb::cpp::this_thread::sleep_for
Defined in carb/cpp/Thread.h
-
template<class Rep, class Period>
void carb::cpp::this_thread::sleep_for(
)# Blocks the execution of the current thread for at least the specified duration.
This function may block for longer than
delay
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.
- Parameters:
delay – The time duration to sleep for.