A safe sleep function.
Namespace:
nsCDEngine.BaseClasses
Assembly:
C-DEngine (in C-DEngine.dll)
public static Task TaskDelayOneEye(
int ms,
uint minPeriod
)
Public Shared Function TaskDelayOneEye ( _
ms As Integer, _
minPeriod As UInteger _
) As Task
Parameters
- ms
- Type: Int32
Time in ms to sleep.
- minPeriod
- Type: UInt32
Probe for MASTERSWITCH every minPeriod ms.
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 the app was closed during this period.