Skip to content

aninest root / sleep / sleep

sleep()

ts
function sleep(seconds): Promise<void>

Sleep for a given number of seconds, supporting await syntax.

Parameters

seconds: number

Returns

Promise<void>

Example

ts
await sleep(1) // sleep for 1 second

Defined in

Utils/sleep.ts:9