diff options
Diffstat (limited to 'deps/node/benchmark/timers/timers-cancel-unpooled.js')
-rw-r--r-- | deps/node/benchmark/timers/timers-cancel-unpooled.js | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/deps/node/benchmark/timers/timers-cancel-unpooled.js b/deps/node/benchmark/timers/timers-cancel-unpooled.js deleted file mode 100644 index 1daf68bd..00000000 --- a/deps/node/benchmark/timers/timers-cancel-unpooled.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; -const common = require('../common.js'); -const assert = require('assert'); - -const bench = common.createBenchmark(main, { - n: [1e6], - direction: ['start', 'end'] -}); - -function main({ n, direction }) { - - const timersList = []; - for (var i = 0; i < n; i++) { - timersList.push(setTimeout(cb, i + 1)); - } - - var j; - bench.start(); - if (direction === 'start') { - for (j = 0; j < n; j++) { - clearTimeout(timersList[j]); - } - } else { - for (j = n - 1; j >= 0; j--) { - clearTimeout(timersList[j]); - } - } - bench.end(n); -} - -function cb() { - assert.fail(`Timer ${this._idleTimeout} should not call callback`); -} |