• Checks if a sync snapshot is stale based on age.

    Parameters

    • timestamp: number

      Snapshot timestamp in milliseconds.

    • maxAgeHours: number = 24

      Max age before stale (default 24 hours).

    Returns boolean

    True if stale, false otherwise.

    export function isSyncSnapshotStale(
    timestamp: number,
    maxAgeHours: number = 24,
    ): boolean {
    const ageInHours = (Date.now() - timestamp) / (1000 * 60 * 60);
    return ageInHours > maxAgeHours;
    }