turbo-sync/utils/delay.js

17 lines
243 B
JavaScript
Raw Permalink Normal View History

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