diff --git a/test/sequential/test-timers-setInterval-excludes-callback-duration.js b/test/sequential/test-timers-set-interval-excludes-callback-duration.js similarity index 71% rename from test/sequential/test-timers-setInterval-excludes-callback-duration.js rename to test/sequential/test-timers-set-interval-excludes-callback-duration.js index 662a5055b70df9..736b0f56c5d745 100644 --- a/test/sequential/test-timers-setInterval-excludes-callback-duration.js +++ b/test/sequential/test-timers-set-interval-excludes-callback-duration.js @@ -4,15 +4,14 @@ const Timer = process.binding('timer_wrap').Timer; const assert = require('assert'); let cntr = 0; -let first, second; +let first; const t = setInterval(() => { - common.busyLoop(50); cntr++; if (cntr === 1) { first = Timer.now(); + common.busyLoop(100); } else if (cntr === 2) { - second = Timer.now(); - assert(Math.abs(second - first - 100) < 10); + assert(Timer.now() - first < 120); clearInterval(t); } }, 100);