Function: sleep()
sleep<
T
>(ms
:number
,value
?:T
,options
?:SleepOptions
):Promise
<T
>
Sleeps for the specified number of milliseconds. For a synchronous variant, see sleepSync.
Type Parameters
Type Parameter | Default type |
---|---|
T | undefined |
Parameters
Parameter | Type | Description |
---|---|---|
ms | number | The number of milliseconds to sleep. |
value ? | T | A value with which the promise is fulfilled. |
options ? | SleepOptions | - |
Returns
Promise
<T
>
See
sleepSync for a synchronous version.