# Sandbox.TaskSource.Delay

## Overload 1

```csharp
System.Threading.Tasks.Task Delay(int ms)
```

A task that does nothing for given amount of time in milliseconds.

### Parameters

- `ms` (`int`): Time to wait in milliseconds.

### Returns

`System.Threading.Tasks.Task`

## Overload 2

```csharp
System.Threading.Tasks.Task Delay(int ms, System.Threading.CancellationToken ct)
```

A task that does nothing for given amount of time in milliseconds.

### Parameters

- `ms` (`int`): Time to wait in milliseconds.
- `ct` (`System.Threading.CancellationToken`): Token to cancel the delay early.

### Returns

`System.Threading.Tasks.Task`

Declared in [Sandbox.TaskSource](/api/Sandbox.TaskSource).
Assembly: `Sandbox.Engine`.
