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

Function tick

__tests__/daemon-older-version.test.ts:370–376  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

368 return new Promise((resolve, reject) => {
369 const started = Date.now();
370 const tick = (): void => {
371 let value: T | undefined | null | false;
372 try { value = predicate(); } catch (e) { reject(e); return; }
373 if (value) { resolve(value as T); return; }
374 if (Date.now() - started > timeoutMs) { reject(new Error(`Timed out after ${timeoutMs}ms waiting for: ${label}`)); return; }
375 setTimeout(tick, 25);
376 };
377 tick();
378 });
379}

Callers 1

waitForFunction · 0.70

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected