X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=busy-wait.mjs;h=2add04648a4190d2f787c1341c1a845475c38bc8;hb=48f5216deed3bc4d9a64e81822fe8d6bd5c5cdcd;hp=dd8a74f5a5c2faa69c3310b718d4542b1d7d614c;hpb=6c021ab6f04e4ee6a1109648e541e024bfb8f583;p=benchmarks-js.git diff --git a/busy-wait.mjs b/busy-wait.mjs index dd8a74f..2add046 100644 --- a/busy-wait.mjs +++ b/busy-wait.mjs @@ -45,7 +45,7 @@ async function divideAndConquerTimeoutBusyWait ( * @param intervalMs */ async function setIntervalTimeoutBusyWait (timeoutMs, intervalMs = interval) { - return new Promise(resolve => { + return new Promise((resolve) => { const tries = Math.round(timeoutMs / intervalMs) let count = 0 const triesSetInterval = setInterval(() => { @@ -77,6 +77,6 @@ Benchmark.suite( Benchmark.save({ file: 'busy-wait', format: 'json', details: true }), Benchmark.save({ file: 'busy-wait', format: 'chart.html', details: true }), Benchmark.save({ file: 'busy-wait', format: 'table.html', details: true }) -).catch(err => { +).catch((err) => { console.error(err) })