summaryrefslogtreecommitdiff
path: root/benchmark/process/bench-hrtime.js
blob: 661dff43b0103cafb53daf63ae8aaced4f0a0349 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'use strict';

const common = require('../common');

const bench = common.createBenchmark(main, {
  n: [1e6]
});


function main(conf) {
  const n = conf.n >>> 0;

  bench.start();
  for (var i = 0; i < n; i++) {
    process.hrtime();
  }
  bench.end(n);
}