mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08: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);
|
|
});
|
|
};
|