sleep_for Function
Blocks the calling thread.
template<class Rep,
class Period>
inline void sleep_for(
const chrono::duration<Rep,
Period>& Rel_time
);
Parameters
- Rel_time
A duration object that specifies a time interval.
Remarks
The function blocks the calling thread for at least the time that's specified by Rel_time. This function does not throw any exceptions.
Requirements
Header: thread
Namespace: std::this_thread