Skip to content

Commit

Permalink
Update estimate when using a steady ticker
Browse files Browse the repository at this point in the history
  • Loading branch information
aawsome authored and chris-laplante committed Jan 3, 2023
1 parent 51e8597 commit 2954b1a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/progress_bar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,7 @@ impl TickerControl {
break;
}

state.state.tick = state.state.tick.saturating_add(1);
state.draw(false, Instant::now()).ok();
state.tick(Instant::now());

drop(state); // Don't forget to drop the lock before sleeping
drop(arc); // Also need to drop Arc otherwise BarState won't be dropped
Expand Down

0 comments on commit 2954b1a

Please sign in to comment.