mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:46:45 +00:00
8 lines
169 B
TypeScript
8 lines
169 B
TypeScript
|
const globalTimeout = global.setTimeout;
|
||
|
|
||
|
export const sleep = async (timeout = 0) => {
|
||
|
await new Promise((resolve) => {
|
||
|
globalTimeout(resolve, timeout);
|
||
|
});
|
||
|
};
|