MCPcopy Index your code
hub / github.com/winfunc/opcode / formatDuration

Function formatDuration

src/components/AgentRunOutputViewer.tsx:516–523  ·  view source on GitHub ↗
(ms?: number)

Source from the content-addressed store, hash-verified

514 };
515
516 const formatDuration = (ms?: number) => {
517 if (!ms) return "N/A";
518 const seconds = Math.floor(ms / 1000);
519 if (seconds < 60) return `${seconds}s`;
520 const minutes = Math.floor(seconds / 60);
521 const remainingSeconds = seconds % 60;
522 return `${minutes}m ${remainingSeconds}s`;
523 };
524
525 const formatTokens = (tokens?: number) => {
526 if (!tokens) return "0";

Callers 1

AgentRunOutputViewerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected