MCPcopy Create free account
hub / github.com/Noumena-Network/code / now

Function now

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

Source from the content-addressed store, hash-verified

47 };
48 },
49 now() {
50 if (startTime === 0) {
51 startTime = Date.now();
52 }
53 // When the clock interval is running, return the synchronized tickTime
54 // so all subscribers in the same tick see the same value.
55 // When paused (no keepAlive subscribers), return real-time to avoid
56 // returning a stale tickTime from the last tick before the pause.
57 if (interval && tickTime) {
58 return tickTime;
59 }
60 return Date.now() - startTime;
61 },
62 setTickInterval(ms) {
63 if (ms === currentTickIntervalMs) return;
64 currentTickIntervalMs = ms;

Callers 3

runStartupPrefetchesFunction · 0.85
ws_v2_connectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected