summaryrefslogtreecommitdiff
path: root/benchmark/timers/timers-insert-pooled.js
blob: 59d2c490c3a9b2de44393ff16fe46192289af531 (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.js');

const bench = common.createBenchmark(main, {
  millions: [5],
});

function main({ millions }) {
  const iterations = millions * 1e6;

  bench.start();

  for (var i = 0; i < iterations; i++) {
    setTimeout(() => {}, 1);
  }

  bench.end(iterations / 1e6);
}