MCPcopy Create free account
hub / github.com/garrytan/gstack / formatDuration

Function formatDuration

scripts/eval-watch.ts:66–71  ·  view source on GitHub ↗

Format seconds as Xm Ys

(sec: number)

Source from the content-addressed store, hash-verified

64
65/** Format seconds as Xm Ys */
66function formatDuration(sec: number): string {
67 if (sec < 60) return `${sec}s`;
68 const m = Math.floor(sec / 60);
69 const s = sec % 60;
70 return `${m}m ${s}s`;
71}
72
73/** Render dashboard from heartbeat + partial data. Pure function for testability. */
74export function renderDashboard(heartbeat: HeartbeatData | null, partial: PartialData | null): string {

Callers 1

renderDashboardFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected