import { Accessor } from 'solid-js'; /** * A server-anchored clock for time-derived rendering (countdowns). `nowMs()` * returns "now" corrected to the server's clock, so a skewed device clock * doesn't shift what renders. * * Two phases, provided by ``: * - the first render uses a CONSTANT anchor (`serverNow` itself); * - once the provider has mounted, `nowMs()` advances with real time on a fixed * server↔device offset, so a countdown mounted later (a routed view shown * minutes after the provider mounted) reads the current corrected time rather * than the frozen anchor. */ export interface FanfareClock { nowMs(): number; } /** Constant-anchor clock for server render + first paint (deterministic). Null for an absent/invalid anchor. */ export declare function makeAnchorClock(serverNow: string | undefined): FanfareClock | null; /** Live offset clock captured at provider mount: advances with real time, corrected for device skew. */ export declare function makeOffsetClock(serverNow: string, deviceNowMs: number): FanfareClock | null; /** * Carries an accessor rather than the clock itself: the provider swaps the * anchor clock for the offset clock after mount, and a Solid context value is * read once at creation, so the swap only reaches consumers through a signal. */ export declare const FanfareClockContext: import('solid-js').Context>; /** The provided server-anchored clock, or null when no anchor is in scope. */ export declare function useClock(): Accessor;