MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / tick

Function tick

__tests__/mcp-initialize.test.ts:90–97  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88 return new Promise((resolve, reject) => {
89 const started = Date.now();
90 const tick = () => {
91 const hit = events.find(predicate);
92 if (hit) return resolve(hit);
93 if (Date.now() - started > timeoutMs) {
94 return reject(new Error(`Timed out waiting for predicate. Events: ${JSON.stringify(events)}`));
95 }
96 setTimeout(tick, 20);
97 };
98 tick();
99 });
100}

Callers 1

waitForFunction · 0.70

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected