[core] Add sleep

This commit is contained in:
devlikepro committed 2024-08-07 17:29:09 +07:00
1 parent a9d7cc527c
commit 942bbf9c6c
1 file changed
+4
+4
View File
@@ -32,3 +32,7 @@ export const promiseTimeout = function (
),
]).finally(() => clearTimeout(timer));
};
export async function sleep(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms));
}