refactor: code cleanup
[benchmarks-js.git] / busy-wait.mjs
index dd8a74f5a5c2faa69c3310b718d4542b1d7d614c..578e90c06228df105853fb0623f4a5e72e236f0e 100644 (file)
@@ -45,7 +45,7 @@ async function divideAndConquerTimeoutBusyWait (
  * @param intervalMs
  */
 async function setIntervalTimeoutBusyWait (timeoutMs, intervalMs = interval) {
-  return new Promise(resolve => {
+  return await new Promise(resolve => {
     const tries = Math.round(timeoutMs / intervalMs)
     let count = 0
     const triesSetInterval = setInterval(() => {