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

Function tick

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

Source from the content-addressed store, hash-verified

104 return new Promise((resolve, reject) => {
105 const started = Date.now();
106 const tick = () => {
107 const hit = events.find(predicate);
108 if (hit) return resolve(hit);
109 if (Date.now() - started > timeoutMs) {
110 return reject(new Error(`Timed out waiting for predicate. Events: ${JSON.stringify(events)}`));
111 }
112 setTimeout(tick, 20);
113 };
114 tick();
115 });
116}

Callers 1

waitForFunction · 0.70

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected