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