MCPcopy Create free account
hub / github.com/codeaashu/claude-code / updateInterval

Function updateInterval

src/ink/components/ClockContext.tsx:24–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 }
23 }
24 function updateInterval(): void {
25 const anyKeepAlive = [...subscribers.values()].some(Boolean);
26 if (anyKeepAlive) {
27 if (interval) {
28 clearInterval(interval);
29 interval = null;
30 }
31 if (startTime === 0) {
32 startTime = Date.now();
33 }
34 interval = setInterval(tick, currentTickIntervalMs);
35 } else if (interval) {
36 clearInterval(interval);
37 interval = null;
38 }
39 }
40 return {
41 subscribe(onChange, keepAlive) {
42 subscribers.set(onChange, keepAlive);

Callers 2

subscribeFunction · 0.85
setTickIntervalFunction · 0.85

Calls 1

valuesMethod · 0.80

Tested by

no test coverage detected