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 1bcf29e commit 2c97da8Copy full SHA for 2c97da8
benchmark/url.js
@@ -33,9 +33,8 @@ function benchmark(name, fun) {
33
timestamp = process.hrtime(timestamp);
34
35
var seconds = timestamp[0];
36
- var millis = timestamp[1]; // actually nanoseconds
37
- while (millis > 1000) millis /= 10;
38
- var time = (seconds * 1000 + millis) / 1000;
+ var nanos = timestamp[1];
+ var time = seconds + nanos / 1e9;
39
40
process.stdout.write(util.format('%s sec\n', time.toFixed(3)));
41
}
0 commit comments