(s)
| 95 | } |
| 96 | |
| 97 | export function fmtTime(s) { |
| 98 | if (!isFinite(s) || s < 0) return "00:00"; |
| 99 | const m = Math.floor(s / 60); |
| 100 | const sec = Math.floor(s % 60).toString().padStart(2, "0"); |
| 101 | return `${m.toString().padStart(2, "0")}:${sec}`; |
| 102 | } |
| 103 | |
| 104 | // Ruler tick: M:SS with no leading zero on the minutes digit ("0:30", "1:00", "12:30"). |
| 105 | export function fmtTickLabel(s) { |
no outgoing calls
no test coverage detected