Documentation Home >> Headers >> <thread> Header >> std::this_thread >> std::this_thread::sleep_until Non Member Function

Suspend execution of the current thread until the specified time point has been reached.

template<typename Clock,typename Duration>
void sleep_until(
    std::chrono::time_point<Clock,Duration> const&
    absolute_time);

Effects:

Blocks the current thread until the specified absolute_time has been reached for the specified Clock.

Note:

There is no guarantee as to how long the calling thread will be blocked for, only that Clock::now() returned a time equal to or later than absolute_time at the point at which the thread became unblocked.

Throws:

Nothing

Header

#include <thread>

See Also