Create sleep utils

This commit is contained in:
Unarray 2023-08-26 18:32:00 +02:00
parent 385865b103
commit ef0fa48746
2 changed files with 4 additions and 0 deletions

1
src/utils/sleep/index.ts Normal file
View file

@ -0,0 +1 @@
export * from "./sleep";

3
src/utils/sleep/sleep.ts Normal file
View file

@ -0,0 +1,3 @@
export const sleep = (ms: number): Promise<void> => {
return new Promise((resolve) => setTimeout(resolve, ms));
};