MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / fmt_seconds

Function fmt_seconds

scripts/baseline_workflow_metrics.py:284–291  ·  view source on GitHub ↗
(value: float | None)

Source from the content-addressed store, hash-verified

282
283
284def fmt_seconds(value: float | None) -> str:
285 if value is None:
286 return "—"
287 if value < 60:
288 return f"{value:.0f}s"
289 if value < 3600:
290 return f"{value / 60:.1f}m"
291 return f"{value / 3600:.2f}h"
292
293
294def fmt_rate(value: float | None) -> str:

Callers 1

render_markdownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected