Primitives / API
foldkit-primitives/time
Functions
debounce | Debounced input as a bundle factory: Changed restarts a timer, and the latest value settles as an OutMessage the placement must handle with onOut. Each… |
formatRelativeTime | Relative time as a pure function: picks the unit (seconds through years) and delegates the wording to Intl.RelativeTimeFormat, so locales come from the… |
ticks | Ticks while intervalMs answers Some, each tick one interval after the last and the first one interval after starting. A changed interval applies from the… |
Values
Interval | A wall-clock interval as a bundle: the last tick time in the Model, advanced by a tick stream while running. Sibling of Timer (which counts ticks); this one… |
IntervalMessage | |
IntervalModel | |
Throttle | Leading-edge throttle as a bundle: the first Attempted in an interval surfaces a Throttled OutMessage, the rest are dropped. Attempted reads the clock… |
Throttled | |
ThrottleMessage | |
ThrottleModel | |
Timer | A timer as a bundle: a count in the Model, advanced by a tick stream while running. The clock is Effect's, so tests drive it with TestClock instead of… |
TimerMessage | |
TimerModel | |