Skip to main content

Function: delay()

function delay(
ms: number,
token?: CancellationToken,
runtime?: CancellationTokenRuntime
): Promise<void>;

Defined in: utils/app/async/cancellationToken.ts:156

Delay with cancellation support

Parameters​

ms​

number

Milliseconds to wait.

token?​

CancellationToken

Optional cancellation token.

runtime?​

CancellationTokenRuntime = ...

Returns​

Promise<void>

Promise that resolves after the delay or rejects when cancelled.