MCPcopy Create free account
hub / github.com/bywwcnll/StreamPanel / formatDuration

Function formatDuration

devtools/panel.bundle.js:148–160  ·  view source on GitHub ↗
(ms)

Source from the content-addressed store, hash-verified

146 }
147
148 function formatDuration(ms) {
149 const seconds = Math.floor(ms / 1000);
150 const minutes = Math.floor(seconds / 60);
151 const hours = Math.floor(minutes / 60);
152
153 if (hours > 0) {
154 return `${hours}h ${minutes % 60}m`;
155 } else if (minutes > 0) {
156 return `${minutes}m ${seconds % 60}s`;
157 } else {
158 return `${seconds}s`;
159 }
160 }
161
162 function getStatusText(status) {
163 const statusMap = {

Callers 1

showStatisticsModalFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected