Files
outline/server/utils/timers.ts
2024-03-08 22:02:20 -05:00

9 lines
268 B
TypeScript

/**
* Returns a promise that resolves after a specified number of milliseconds.
*
* @param [delay=1] The number of milliseconds to wait before fulfilling the promise.
*/
export function sleep(ms = 1) {
return new Promise((resolve) => setTimeout(resolve, ms));
}