(ms: number)
| 188 | } |
| 189 | |
| 190 | function formatDuration(ms: number): string { |
| 191 | if (ms < 1000) return `${ms.toFixed(0)}ms`; |
| 192 | if (ms < 60000) return `${(ms / 1000).toFixed(1)}s`; |
| 193 | const minutes = Math.floor(ms / 60000); |
| 194 | const seconds = Math.floor((ms % 60000) / 1000); |
| 195 | return `${minutes}m ${seconds}s`; |
| 196 | } |
| 197 | |
| 198 | function formatAbbreviatedNumber(n: number): string { |
| 199 | if (n < 1000) return n.toString(); |
no outgoing calls
no test coverage detected