(startedAt)
| 57 | } |
| 58 | |
| 59 | function formatElapsed(startedAt) { |
| 60 | const seconds = Math.floor((Date.now() - startedAt) / 1000); |
| 61 | const minutes = Math.floor(seconds / 60); |
| 62 | const rest = seconds % 60; |
| 63 | return minutes > 0 ? `${minutes}m ${rest}s` : `${rest}s`; |
| 64 | } |
| 65 | |
| 66 | function startProgressStatus(messages) { |
| 67 | const startedAt = Date.now(); |