Click or drag to resize
DelayedTaskDelay Method (TimeSpan)
Creates a task that will complete after a time delay.

Namespace: Rackspace.Threading
Assembly: Rackspace.Threading (in Rackspace.Threading.dll) Version: 2.1.0-beta1
Syntax
public static Task Delay(
	TimeSpan delay
)

Parameters

delay
Type: SystemTimeSpan
The time span to wait before completing the returned task

Return Value

Type: Task
A task that represents the time delay
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionIf delay represents a negative time interval.
Remarks

After the specified time delay, the task is completed in RanToCompletion state.

This method ignores any fractional milliseconds when evaluating delay.

Version Information

.NET for Windows Store apps

Supported in: Windows 8

.NET Framework

Supported in: 4.5, 4.0, 3.5

Portable Class Library

Supported in: Portable Class Library (Legacy), Portable Class Library

Threading Library

Supported in: 2.1, 2.0, 1.1
See Also