MCPcopy Create free account
hub / github.com/nodejs/node / scheduleUpdateChildWatches

Function scheduleUpdateChildWatches

test/fixtures/snapshot/typescript.js:6624–6637  ·  view source on GitHub ↗
(dirName, dirPath, fileName, options)

Source from the content-addressed store, hash-verified

6622 removeChildWatches(parentWatcher);
6623 }
6624 function scheduleUpdateChildWatches(dirName, dirPath, fileName, options) {
6625 var existing = cacheToUpdateChildWatches.get(dirPath);
6626 if (existing) {
6627 existing.fileNames.push(fileName);
6628 }
6629 else {
6630 cacheToUpdateChildWatches.set(dirPath, { dirName: dirName, options: options, fileNames: [fileName] });
6631 }
6632 if (timerToUpdateChildWatches) {
6633 clearTimeout(timerToUpdateChildWatches);
6634 timerToUpdateChildWatches = undefined;
6635 }
6636 timerToUpdateChildWatches = setTimeout(onTimerToUpdateChildWatches, 1000);
6637 }
6638 function onTimerToUpdateChildWatches() {
6639 timerToUpdateChildWatches = undefined;
6640 sysLog("sysLog:: onTimerToUpdateChildWatches:: ".concat(cacheToUpdateChildWatches.size));

Callers 1

Calls 5

getMethod · 0.65
clearTimeoutFunction · 0.50
setTimeoutFunction · 0.50
pushMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected