2024-10-16 07:29:28 +00:00
|
|
|
// @ts-check
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param {number} [time]
|
|
|
|
* @returns
|
|
|
|
*/
|
2024-10-16 08:40:21 +00:00
|
|
|
async function delay(time = 500) {
|
2024-10-16 07:29:28 +00:00
|
|
|
return new Promise((resolve) => {
|
|
|
|
setTimeout(() => {
|
|
|
|
resolve(true);
|
2024-10-16 08:40:21 +00:00
|
|
|
}, time);
|
2024-10-16 07:29:28 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = delay;
|