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

Function formatTime

src/components/ExecutionControlBar.tsx:27–34  ·  view source on GitHub ↗
(seconds: number)

Source from the content-addressed store, hash-verified

25}) => {
26 // Format elapsed time
27 const formatTime = (seconds: number) => {
28 const mins = Math.floor(seconds / 60);
29 const secs = seconds % 60;
30 if (mins > 0) {
31 return `${mins}m ${secs.toFixed(0)}s`;
32 }
33 return `${secs.toFixed(1)}s`;
34 };
35
36 // Format token count
37 const formatTokens = (tokens: number) => {

Callers 2

ExecutionControlBarFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected