Delay()

System::Threading::Tasks::Delay(int32_t) function

Creates a task that completes after a time delay.

TaskPtr System::Threading::Tasks::Delay(int32_t millisecondsDelay)

Arguments

ParameterTypeDescription
millisecondsDelayint32_tThe number of milliseconds to wait before completing the returned task, or -1 to wait indefinitely.

Return Value

A task that represents the time delay.

System::Threading::Tasks::Delay(int32_t, const CancellationToken&) function

TaskPtr System::Threading::Tasks::Delay(int32_t millisecondsDelay, const CancellationToken &cancellationToken)

See Also