MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / formatElapsedDuration

Method formatElapsedDuration

src/ui/StatusBarService.ts:331–345  ·  view source on GitHub ↗
(durationMs: number)

Source from the content-addressed store, hash-verified

329 }
330
331 private formatElapsedDuration(durationMs: number): string {
332 const totalSeconds = Math.floor(durationMs / 1000);
333 const seconds = totalSeconds % 60;
334 const totalMinutes = Math.floor(totalSeconds / 60);
335 const minutes = totalMinutes % 60;
336 const hours = Math.floor(totalMinutes / 60);
337
338 if (hours > 0) {
339 return `${hours}:${minutes.toString().padStart(2, "0")}:${seconds
340 .toString()
341 .padStart(2, "0")}`;
342 }
343
344 return `${minutes}:${seconds.toString().padStart(2, "0")}`;
345 }
346
347 private startElapsedTicker(): void {
348 if (this.elapsedUpdateInterval !== null) {

Callers 1

renderStatusBarMethod · 0.95

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected