MCPcopy Index your code
hub / github.com/ColmapView/Colmapview.github.io / check

Function check

src/components/viewer3d/webGpuSplatViewIdle.ts:37–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35): Promise<void> {
36 return new Promise((resolve) => {
37 const check = () => {
38 if (isCancelled()) {
39 resolve();
40 return;
41 }
42 const sinceChangeMs = nowMs() - getLastFrameChangeMs();
43 if (sinceChangeMs >= idleMs) {
44 resolve();
45 return;
46 }
47 setTimeout(check, Math.max(16, idleMs - sinceChangeMs));
48 };
49 check();
50 });
51}

Callers 1

Calls 2

nowMsFunction · 0.85
resolveFunction · 0.50

Tested by

no test coverage detected