Suspend the current thread for at least the specified relative time.

Synopsis

Declared in <bslmt_threadutil.h>

template<
    class REP_TYPE,
    class PERIOD_TYPE>
static
void
sleep(bsl::chrono::duration<REP_TYPE, PERIOD_TYPE> const& sleepTime);

Description

Suspend execution of the current thread for a period of at least the specified (relative) sleepTime, or an interrupting signal is received. Note that the actual time suspended depends on many factors including system scheduling and system timer resolution.

Parameters

Name

Description

sleepTime

minimum relative duration to sleep

Created with MrDocs