(ms)
| 36 | } |
| 37 | |
| 38 | function formatDuration(ms) { |
| 39 | const total = Math.max(0, Math.floor(ms / 1000)); |
| 40 | const m = Math.floor(total / 60); |
| 41 | const s = total % 60; |
| 42 | return `${m}:${String(s).padStart(2, '0')}`; |
| 43 | } |
| 44 | |
| 45 | function readStoredSpeed() { |
| 46 | try { |