MCPcopy Create free account
hub / github.com/Fibi66/FeiControl / formatDuration

Function formatDuration

src/components/CronJobCard.tsx:141–148  ·  view source on GitHub ↗
(durationMs?: number | null)

Source from the content-addressed store, hash-verified

139}
140
141function formatDuration(durationMs?: number | null): string {
142 if (typeof durationMs !== "number" || Number.isNaN(durationMs)) {
143 return "—";
144 }
145 if (durationMs < 1000) return `${durationMs}ms`;
146 if (durationMs < 60000) return `${(durationMs / 1000).toFixed(1)}s`;
147 return `${(durationMs / 60000).toFixed(1)}m`;
148}
149
150function getToneStyles(tone: Tone): CSSProperties {
151 switch (tone) {

Callers 1

getHealthMetaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected