Suspend execution of the current thread for the specified duration.
template<typename Rep,typename Period> void sleep_for( std::chrono::duration<Rep,Period> const& relative_time);
- Effects:
Blocks the current thread until the specified
relative_timehas elapsed.- Note:
The thread may be blocked for longer than the specified duration. Where possible, the elapsed time is determined by a steady clock.
- Throws:
Nothing
Header
#include <thread>