Table of Contents

Method Sleep

Namespace
KZDev.SystemClock.PrimeTime
Assembly
KZDev.SystemClock.PrimeTime.dll

Sleep(TimeSpan)

Suspends the current thread for the specified amount of time.

void Sleep(TimeSpan sleepTime)

Parameters

sleepTime TimeSpan

The amount of time for which the thread is suspended. If the value is Zero, the thread relinquishes the remainder of its time slice to any thread of equal priority that is ready to run. If there are no other threads of equal priority that are ready to run, execution of the current thread is not suspended.

Exceptions

ArgumentOutOfRangeException

sleepTime is not a valid sleep interval (for example, negative and not an infinite timeout, or too large to express in milliseconds).

See Also

Sleep(int)

Suspends the current thread for the specified number of milliseconds.

void Sleep(int sleepMilliseconds)

Parameters

sleepMilliseconds int

The number of milliseconds for which the thread is suspended. If the value is zero, the thread relinquishes the remainder of its time slice to any thread of equal priority that is ready to run. If there are no other threads of equal priority that are ready to run, execution of the current thread is not suspended.

Exceptions

ArgumentOutOfRangeException

sleepMilliseconds is negative and not equal to Infinite.

See Also