From 2954b1a24ac5f1900a7861992e4825bff643c9e2 Mon Sep 17 00:00:00 2001 From: aawsome <37850842+aawsome@users.noreply.github.com> Date: Fri, 2 Dec 2022 23:39:51 +0100 Subject: [PATCH] Update estimate when using a steady ticker --- src/progress_bar.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/progress_bar.rs b/src/progress_bar.rs index 60788f36..5aa079f9 100644 --- a/src/progress_bar.rs +++ b/src/progress_bar.rs @@ -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