diff options
Diffstat (limited to 'test/pummel/test-process-hrtime.js')
-rw-r--r-- | test/pummel/test-process-hrtime.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/pummel/test-process-hrtime.js b/test/pummel/test-process-hrtime.js index 04225bae42..d02b9c7982 100644 --- a/test/pummel/test-process-hrtime.js +++ b/test/pummel/test-process-hrtime.js @@ -1,18 +1,18 @@ 'use strict'; require('../common'); -var assert = require('assert'); +const assert = require('assert'); -var start = process.hrtime(); +const start = process.hrtime(); // process.hrtime() should return an Array assert(Array.isArray(start)); // busy-loop for 2 seconds -var now = Date.now(); +const now = Date.now(); while (Date.now() - now < 2000); // get a diff reading -var diff = process.hrtime(start); +const diff = process.hrtime(start); // should be at least 1 second, at most 2 seconds later // (the while loop will usually exit a few nanoseconds before 2) |