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