MCPcopy Create free account
hub / github.com/dailydotdev/apps / later

Function later

packages/shared/src/features/patchy/patchyIdle.ts:111–117  ·  view source on GitHub ↗
(fn: () => void, ms: number)

Source from the content-addressed store, hash-verified

109 const timers = new Set<ReturnType<typeof setTimeout>>();
110 let isBusy = false;
111 const later = (fn: () => void, ms: number) => {
112 const id = setTimeout(() => {
113 timers.delete(id);
114 fn();
115 }, ms);
116 timers.add(id);
117 };
118 const play = (name: PatchyIdleActionName) => {
119 if (document.hidden) {
120 return;

Callers 4

SimProviderFunction · 0.85
playFunction · 0.85
blinkLoopFunction · 0.85
actionLoopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected