From 475a1ccf26691bc8898e60100a2c604479abd4ef Mon Sep 17 00:00:00 2001 From: Alexey Date: Tue, 23 Jul 2019 19:43:24 +0300 Subject: [PATCH] sleep util --- utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils.js b/utils.js index e626077..dd8e7d8 100644 --- a/utils.js +++ b/utils.js @@ -78,4 +78,8 @@ function isValidProof(proof) { return { valid: true } } -module.exports = { fetchGasPrice, isValidProof } +function sleep(ms) { + return new Promise(resolve => setTimeout(resolve, ms)) +} + +module.exports = { fetchGasPrice, isValidProof, sleep }