Consider start/reset
vincentjames501 opened this issue · comments
Right now the start_at
time on the ProgressBar
is set once the counter advances from zero. It would be nice to have more control over this as the eta and elapsed time could be wrong (the time shouldn't necessarily start when the progress advances past).
p = TTY::ProgressBar.new("[:bar]", total: 100)
p.start # Draws the bar @0% progress and initializes the start_at property
p.advance(50) # Draws the bar @50% progress
p.reset # Resets the progress bar @0% progress
p.advance(50) # Draws the bar @50% progress
p.finish # Draws the bar @100% progress and finishes it
Implemented in the master and documented.