import { createSignal } from "solid-js"; // Global 5-second ticker used by relative-time helpers so their output // renders as a live countdown. At this cadence the age column reads like // a real-time clock for fresh transitions ("5s ago", "6s ago", ...) and // the cost is a single reactive re-run per subscribed cell per second — // no network, no DOM allocation, just string formatting. Identical-value // updates (e.g. "2h ago" → "2h ago") are cheap because Solid's JSX // compiler skips DOM writes when the new text matches the old. // // Reading tick() inside any reactive expression subscribes that // expression to the ticker; when the interval fires, every subscriber // re-runs. One timer drives the whole app. const [tick, setTick] = createSignal(0); setInterval(() => setTick((t) => t + 1), 5_000); export { tick };