Sleep for the specified amount of time to pass on the specified clock.
If the remaining time is non-zero the condition that caused the sleep to abort can be obtained by inspecting errno.
34 {
36 std::timespec remainder;
37
38 auto const req = &sleepTime;
39 auto const rem = &remainder;
40
41#if defined(__linux__)
43 errno = result;
44#elif defined(__APPLE__)
45 auto const result = ::nanosleep(req, rem);
46#else
47# pragma GCC error No this_thread::sleep() implementation available for the current platform.
48#endif
49
50
51
53 }
constexpr clockid_t clockToId(Clock clock) noexcept
constexpr std::timespec asTimeSpec(Timepoint timepoint) noexcept
constexpr Duration asDuration(std::timespec const &duration) noexcept