Spaces:
Runtime error
Runtime error
Download frontend/src/utils/time.ts from GaryLeckey/aureon-os: direct link, hf CLI and curl.
- Browser
- Download file 639 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
639 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(); | |
| } |