MCPcopy Create free account
hub / github.com/FastLED/FastLED / formatTime

Function formatTime

ci/docker_utils/avr8js/format-time.ts:9–14  ·  view source on GitHub ↗
(seconds: number)

Source from the content-addressed store, hash-verified

7 }
8
9 export function formatTime(seconds: number) {
10 const ms = Math.floor(seconds * 1000) % 1000;
11 const secs = Math.floor(seconds % 60);
12 const mins = Math.floor(seconds / 60);
13 return `${zeroPad(mins, 2)}:${zeroPad(secs, 2)}.${zeroPad(ms, 3)}`;
14 }
15

Callers 1

executeProgramFunction · 0.90

Calls 2

zeroPadFunction · 0.85
floorMethod · 0.45

Tested by

no test coverage detected