summaryrefslogtreecommitdiff
path: root/test/sequential/test-performance-eventloopdelay.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/sequential/test-performance-eventloopdelay.js')
-rw-r--r--test/sequential/test-performance-eventloopdelay.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/sequential/test-performance-eventloopdelay.js b/test/sequential/test-performance-eventloopdelay.js
index 7b9527b386..8e7ee4f0ad 100644
--- a/test/sequential/test-performance-eventloopdelay.js
+++ b/test/sequential/test-performance-eventloopdelay.js
@@ -1,4 +1,4 @@
-// Flags: --expose-gc
+// Flags: --expose-gc --expose-internals
'use strict';
const common = require('../common');
@@ -6,6 +6,7 @@ const assert = require('assert');
const {
monitorEventLoopDelay
} = require('perf_hooks');
+const { sleep } = require('internal/util');
{
const histogram = monitorEventLoopDelay();
@@ -54,7 +55,7 @@ const {
histogram.enable();
let m = 5;
function spinAWhile() {
- common.busyLoop(1000);
+ sleep(1000);
if (--m > 0) {
setTimeout(spinAWhile, common.platformTimeout(500));
} else {