()
| 198 | } |
| 199 | |
| 200 | start(): void { |
| 201 | if (this.totalItems === 0) return |
| 202 | |
| 203 | this.startTime = Date.now() |
| 204 | this.processedItems = 0 |
| 205 | this.stopped = false |
| 206 | if (!canRewriteStdoutLine()) return |
| 207 | this.render() // Initial render |
| 208 | // Update every second for elapsed time and ETA |
| 209 | this.timerId = setInterval(() => this.render(), 1000) |
| 210 | } |
| 211 | |
| 212 | update(processedCount: number): void { |
| 213 | if (this.totalItems === 0 || this.stopped) return |
no test coverage detected