aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.ts')
-rw-r--r--src/utils.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils.ts b/src/utils.ts
index 0dc0bb1..a767896 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -7,3 +7,7 @@ export function getRandomInt(min: number, max: number): number {
export function getRandomEl<T>(arr: Array<T>): T {
return arr[getRandomInt(0, arr.length)];
}
+export async function sleep(time: number) {
+ return new Promise(resolve => setTimeout(resolve, time));
+}
+