aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.ts
diff options
context:
space:
mode:
authorMaksymilian Jopek <maks@jopek.eu>2022-03-27 23:06:05 +0200
committerMaksymilian Jopek <maks@jopek.eu>2022-03-27 23:06:05 +0200
commit6b08c641e9ad1f3b1c7ecc626efc0ee34d3d6925 (patch)
tree52a77c928e527125c752fdc2fec5d1809ea43818 /src/utils.ts
parentab750d05a2eb580067e51c26032ff24358834d0b (diff)
downloadboules-6b08c641e9ad1f3b1c7ecc626efc0ee34d3d6925.tar.gz
boules-6b08c641e9ad1f3b1c7ecc626efc0ee34d3d6925.tar.zst
boules-6b08c641e9ad1f3b1c7ecc626efc0ee34d3d6925.zip
v0.1.0 - Game without ending
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));
+}
+