* Format duration in milliseconds to human readable
(ms: number)
| 279 | * Format duration in milliseconds to human readable |
| 280 | */ |
| 281 | function formatDuration(ms: number): string { |
| 282 | if (ms < 1000) { |
| 283 | return `${ms}ms`; |
| 284 | } |
| 285 | const seconds = ms / 1000; |
| 286 | if (seconds < 60) { |
| 287 | return `${seconds.toFixed(1)}s`; |
| 288 | } |
| 289 | const minutes = Math.floor(seconds / 60); |
| 290 | const remainingSeconds = seconds % 60; |
| 291 | return `${minutes}m ${remainingSeconds.toFixed(0)}s`; |
| 292 | } |
| 293 | |
| 294 | // Shimmer progress renderer (runs in a worker thread for smooth animation) |
| 295 | // Imported at top of file from '../ui/shimmer-progress' |
no outgoing calls
no test coverage detected