mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
Rename the `server/` directory to `hub/` and update all references across CLI, docs, web, and workspace configuration.
8 lines
216 B
TypeScript
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
|
|
}
|