MCPcopy Index your code
hub / github.com/nodejs/node / interval

Function interval

test/parallel/test-timers-args.js:19–28  ·  view source on GitHub ↗
(nargs)

Source from the content-addressed store, hash-verified

17}
18
19function interval(nargs) {
20 const args = range(nargs);
21 const timer = setTimeout.apply(null, [callback, 1].concat(args));
22
23 function callback() {
24 clearInterval(timer);
25 assert.deepStrictEqual([].slice.call(arguments), args);
26 if (nargs < 128) interval(nargs + 1);
27 }
28}
29
30timeout(0);
31interval(0);

Callers 2

callbackFunction · 0.85

Calls 3

concatMethod · 0.80
rangeFunction · 0.70
applyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…