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