Spaces:
Paused
Paused
Deploy Aureon OS (deploy/selfhost stack: nginx edge + fusion API x2 + console + HNC organ + redis + postgres; paper mode) (part 18)
f568a4f verified Download frontend/src/utils/time.ts from GaryLeckey/aureon-os: direct link, hf CLI and curl.
- Browser
- Download file 657 Bytes
-
https://huggingface.co/spaces/GaryLeckey/aureon-os/resolve/main/frontend/src/utils/time.ts
- Command line
-
hf download hf://spaces/GaryLeckey/aureon-os/frontend/src/utils/time.ts
-
curl -L -o time.ts https://huggingface.co/spaces/GaryLeckey/aureon-os/resolve/main/frontend/src/utils/time.ts
657 Bytes
| export function nowMicros(): number { | |
| // performance.timeOrigin + performance.now() gives wall-clock microseconds | |
| // Convert to integer microseconds for precision display | |
| return Math.round((performance.timeOrigin + performance.now()) * 1000); | |
| } | |
| export function elapsedMicros(startTime: number): number { | |
| return nowMicros() - startTime; | |
| } | |
| export function formatMicros(micros: number): string { | |
| if (micros < 1000) return `${micros}μs`; | |
| if (micros < 1000000) return `${(micros / 1000).toFixed(1)}ms`; | |
| return `${(micros / 1000000).toFixed(2)}s`; | |
| } | |
| export function isoTimestamp(): string { | |
| return new Date().toISOString(); | |
| } |