C-DEngine 5.105

TheCommonUtils..::..SleepOneEyeWithCancel Method

A safe sleep function.

Namespace:  nsCDEngine.BaseClasses
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public static void SleepOneEyeWithCancel(
	uint ms,
	uint minPeriod,
	Object cancelToken
)
Public Shared Sub SleepOneEyeWithCancel ( _
	ms As UInteger, _
	minPeriod As UInteger, _
	cancelToken As Object _
)
public:
static void SleepOneEyeWithCancel(
	unsigned int^ ms, 
	unsigned int^ minPeriod, 
	Object^ cancelToken
)

Parameters

ms
Type: UInt32
Time in ms to sleep.
minPeriod
Type: UInt32
Probe for MASTERSWITCH every minPeriod ms.
cancelToken
Type: Object
A cancel token created by calling SleepOneEyeGetCancelToken().

Remarks


This function sleeps for the specified number of milliseconds. Returns a task that completes after a certain period of time but cancels (faults with TaskCanceledException) if TheBaseAssets.MASTERSWICH indicates that a shutdown was started during this period.