xtd 0.2.0
Loading...
Searching...
No Matches

◆ sleep() [2/2]

static void xtd::threading::thread::sleep ( const time_span timeout)
static

Suspends the current thread for a specified time.

Parameters
timeoutA std::chrono::duration set to the amount of time for which the thread is blocked. Specify zero to indicate that this thread should be suspended to allow other waiting threads to execute. Specify xtd::threading::Timeout.Infinite to block the thread indefinitely.
Exceptions
xtd::argument_exceptionThe value of timeout is negative and is not equal to xtd::threading::timeout::infinite in milliseconds, or is greater than xtd::Int32.MaxValue milliseconds.