We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0d04ff commit bf0bc35Copy full SHA for bf0bc35
1 file changed
doc/api/process.markdown
@@ -417,14 +417,15 @@ primary use is for measuring performance between intervals.
417
You may pass in the result of a previous call to `process.hrtime()` to get
418
a diff reading, useful for benchmarks and measuring intervals:
419
420
- var t = process.hrtime();
+ var time = process.hrtime();
421
// [ 1800216, 927643717 ]
422
423
setTimeout(function () {
424
- t = process.hrtime(t);
+ var diff = process.hrtime(time);
425
// [ 1, 6962306 ]
426
427
- console.log('benchmark took %d seconds and %d nanoseconds', t[0], t[1]);
+ console.log('benchmark took %d seconds and %d nanoseconds',
428
+ diff[0], diff[1]);
429
// benchmark took 1 seconds and 6962306 nanoseconds
430
}, 1000);
431
0 commit comments