* Format duration in milliseconds to human readable
(ms: number)
| 235 | * Format duration in milliseconds to human readable |
| 236 | */ |
| 237 | function formatDuration(ms: number): string { |
| 238 | if (ms < 1000) { |
| 239 | return `${ms}ms`; |
| 240 | } |
| 241 | const seconds = ms / 1000; |
| 242 | if (seconds < 60) { |
| 243 | return `${seconds.toFixed(1)}s`; |
| 244 | } |
| 245 | const minutes = Math.floor(seconds / 60); |
| 246 | const remainingSeconds = seconds % 60; |
| 247 | return `${minutes}m ${remainingSeconds.toFixed(0)}s`; |
| 248 | } |
| 249 | |
| 250 | // Shimmer progress renderer (runs in a worker thread for smooth animation) |
| 251 | // Imported at top of file from '../ui/shimmer-progress' |
no outgoing calls
no test coverage detected