17 lines
243 B
JavaScript
17 lines
243 B
JavaScript
// @ts-check
|
|
|
|
/**
|
|
*
|
|
* @param {number} [time]
|
|
* @returns
|
|
*/
|
|
async function delay(time = 500) {
|
|
return new Promise((resolve) => {
|
|
setTimeout(() => {
|
|
resolve(true);
|
|
}, time);
|
|
});
|
|
}
|
|
|
|
module.exports = delay;
|