From 58901927518997e1237f2c787604f84c5c42bf2c Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Thu, 30 Jan 2020 23:15:08 +0100 Subject: [PATCH] sleep() to utils --- src/common/js/utils.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/common/js/utils.js diff --git a/src/common/js/utils.js b/src/common/js/utils.js new file mode 100644 index 0000000..51b48a3 --- /dev/null +++ b/src/common/js/utils.js @@ -0,0 +1,3 @@ +export async function sleep(timeout) { + return new Promise( (resolve, reject) => setTimeout(() => resolve(), timeout)); +}