MCPcopy Create free account
hub / github.com/Effect-TS/effect / rearmInterval

Function rearmInterval

packages/effect/src/ui/Query.ts:5818–5828  ·  view source on GitHub ↗
(entry: Entry)

Source from the content-addressed store, hash-verified

5816 * polling carries on. While paused the due time stays for the edge pass.
5817 */
5818 const rearmInterval = (entry: Entry): void => {
5819 if (
5820 settleOnce || disposed || entry.removed || entry.watchers.size === 0 ||
5821 entry.fetch !== undefined
5822 ) return
5823 if (entry.intervalCancel !== undefined || paused()) return
5824 const ms = intervalMs(entry)
5825 if (ms === undefined) return
5826 entry.intervalDue = now() + ms
5827 armInterval(entry)
5828 }
5829 const intervalElapsed = (entry: Entry): boolean => entry.intervalDue !== undefined && entry.intervalDue <= now()
5830
5831 const moreOf = (entry: Entry): More<any> | undefined => entry.def.list?.ops.moreOf(entry)

Callers 2

afterFetchFunction · 0.85
revertFunction · 0.85

Calls 4

pausedFunction · 0.85
intervalMsFunction · 0.85
armIntervalFunction · 0.85
nowFunction · 0.70

Tested by

no test coverage detected