MCPcopy Create free account
hub / github.com/Tong89/smartNode / formatDuration

Function formatDuration

frontend/app.js:1448–1453  ·  view source on GitHub ↗
(seconds)

Source from the content-addressed store, hash-verified

1446 },
1447
1448 formatDuration(seconds) {
1449 const total = Math.max(0, Math.floor(Number(seconds || 0)));
1450 if (total < 60) return `${total}s`;
1451 if (total < 3600) return `${Math.floor(total / 60)}m ${total % 60}s`;
1452 return `${Math.floor(total / 3600)}h ${Math.floor((total % 3600) / 60)}m`;
1453 },
1454
1455 formatProgress(progress) {
1456 const value = Number(progress || 0);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected