MCPcopy Index your code
hub / github.com/bombshell-dev/clack / formatTimer

Function formatTimer

packages/prompts/src/spinner.ts:123–128  ·  view source on GitHub ↗
(origin: number)

Source from the content-addressed store, hash-verified

121 };
122
123 const formatTimer = (origin: number): string => {
124 const duration = (performance.now() - origin) / 1000;
125 const min = Math.floor(duration / 60);
126 const secs = Math.floor(duration % 60);
127 return min > 0 ? `[${min}m ${secs}s]` : `[${secs}s]`;
128 };
129
130 const hasGuide = opts.withGuide ?? settings.withGuide;
131

Callers 2

startFunction · 0.85
_stopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected