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

Function scheduleInterval

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

Source from the content-addressed store, hash-verified

5803 }
5804 /** Counts from the last settle. Called at a settle and at the zero-to-one watch. */
5805 const scheduleInterval = (entry: Entry): void => {
5806 stopInterval(entry)
5807 if (settleOnce || entry.removed || entry.watchers.size === 0) return
5808 const ms = intervalMs(entry)
5809 if (ms === undefined) return
5810 entry.intervalDue = entry.settledAt + ms
5811 armInterval(entry)
5812 }
5813 /**
5814 * A fetch ended without a settle. If the interval's timer already fired,
5815 * nothing else would arm it again, so a new interval counts from now and

Callers 3

storeFunction · 0.85
watchFunction · 0.85
holdFunction · 0.85

Calls 3

stopIntervalFunction · 0.85
intervalMsFunction · 0.85
armIntervalFunction · 0.85

Tested by

no test coverage detected