summaryrefslogtreecommitdiff
path: root/test/parallel/test-timers-timeout-to-interval.js
blob: 6b83e2e09e34a59c5c3659bfe46fa9474c72b648 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
'use strict';
const common = require('../common');

// This isn't officially supported but nonetheless is something that is
// currently possible and as such it shouldn't cause the process to crash

const t = setTimeout(common.mustCall(() => {
  if (t._repeat) {
    clearInterval(t);
  }
  t._repeat = 1;
}, 2), 1);