@newdash/newdash
Version:
javascript/typescript utility library
20 lines (19 loc) • 345 B
TypeScript
/**
* async sleep, release CPU and go to next action after milliseconds
*
* @category Async
* @param ms millisecond
* @example
*
* ```js
*
* async function() {
* await sleep(1000)
* // after 1 seconds
* // do something other
* }
*
* ```
*/
export declare function sleep(ms: number): Promise<void>;
export default sleep;