Files
hapi/hub/src/sync/aliveTime.ts
T
weishu 37e10a831b feat: rename server package to hub
Rename the `server/` directory to `hub/` and update all references
across CLI, docs, web, and workspace configuration.
2026-01-27 19:51:21 +08:00

8 lines
216 B
TypeScript

export function clampAliveTime(t: number): number | null {
if (!Number.isFinite(t)) return null
const now = Date.now()
if (t > now) return now
if (t < now - 1000 * 60 * 10) return null
return t
}