Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
sleep_for Function

sleep_for Function

Blocks the calling thread.

template<class Rep,
class Period>
inline void sleep_for(
   const chrono::duration<Rep,
   Period>& Rel_time


A duration object that specifies a time interval.

The function blocks the calling thread for at least the time that's specified by Rel_time. This function does not throw any exceptions.

Header: thread

Namespace: std::this_thread

© 2015 Microsoft