* Format duration in milliseconds to human readable
(ms: number)
| 305 | * Format duration in milliseconds to human readable |
| 306 | */ |
| 307 | function formatDuration(ms: number): string { |
| 308 | if (ms < 1000) { |
| 309 | return `${ms}ms`; |
| 310 | } |
| 311 | const seconds = ms / 1000; |
| 312 | if (seconds < 60) { |
| 313 | return `${seconds.toFixed(1)}s`; |
| 314 | } |
| 315 | const minutes = Math.floor(seconds / 60); |
| 316 | const remainingSeconds = seconds % 60; |
| 317 | return `${minutes}m ${remainingSeconds.toFixed(0)}s`; |
| 318 | } |
| 319 | |
| 320 | // Shimmer progress renderer (runs in a worker thread for smooth animation) |
| 321 | // Imported at top of file from '../ui/shimmer-progress' |
no outgoing calls
no test coverage detected