sleep
sleep(
ms
):Promise
<void
>
Pauses the execution of an asynchronous function for a specified duration.
Parameters
Parameter | Type | Description |
---|---|---|
ms | number | The number of milliseconds to sleep before resolving the promise. |
Returns
Promise
<void
>
A promise that resolves after the specified duration.