Methods
(static) asyncTimeout(ms) → {Promise.<void>}
Provides a timeout within async/await structures.
Parameters:
Name | Type | Description |
---|---|---|
ms |
number |
- Source:
Returns:
- Type
- Promise.<void>
Example
await someFunction()
await asyncTimeout(500) // sleep for 500ms
await someOtherFunction()