@highoutput/delay
v0.2.8
Published
## `delay(duration)` * `duration` `(number|string)` Amount of time to wait * Returns: `(Promise)`
Downloads
478
Keywords
Readme
@highoutput/delay
delay(duration)
duration
(number|string)
Amount of time to wait- Returns:
(Promise)
Wait for a given amount of time. The input can be a string compatible to the ms
module.
Examples
import { delay } from 'highoutput-utilities';
async function main() {
await delay(1000); // wait for 1 second
await delay('1m'); // wait for 1 minute
}
main();