* Format simulation seconds to "HH:MM:SS". * Mirrors app.js `methods.formatTime`.
(seconds)
| 49 | * Mirrors app.js `methods.formatTime`. |
| 50 | */ |
| 51 | function formatTime(seconds) { |
| 52 | const total = Math.max(0, Math.floor(Number(seconds || 0))); |
| 53 | const hours = Math.floor(total / 3600); |
| 54 | const minutes = Math.floor((total % 3600) / 60); |
| 55 | const secs = total % 60; |
| 56 | return [hours, minutes, secs].map((part) => String(part).padStart(2, '0')).join(':'); |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * Build utilization row array from resource_status.summary. |