// A running clock, compactly: "42s", "3m07s", "2h05m". The operations board's // runner header and every in-flight row read it. (Not formatDuration's // "3:07": that one is a media duration, and it renders 0 as "".) export function formatElapsed(ms: number): string { const s = Math.max(0, Math.floor(ms / 1000)); if (s < 60) return `${s}s`; const m = Math.floor(s / 60); if (m < 60) { const rem = s % 60; return rem === 0 ? `${m}m` : `${m}m${String(rem).padStart(2, "0")}s`; } const h = Math.floor(m / 60); return `${h}h${String(m % 60).padStart(2, "0")}m`; }