turbo-sync/utils/delay.js
2024-10-16 09:40:21 +01:00

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;