-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duration becomes 0 after calling finish()
#557
Comments
"Intentional" is a big word. 😄 I suppose we don't ever store the time when we finished, so we don't really have any better value we can show here. I suppose we could add an |
@djc To me it seems that I tried it out here and it seems to work: https://github.com/suomela/indicatif — there's |
It might work well immediately after finish, but if a redraw happens sometime after finishing, then elapsed will continue to move forward, which I don't think makes sense. |
I see, I think |
I was talking about |
If I have got a
ProgressBar
withProgressStyle
that uses a template like"… {elapsed}/{duration} …"
. As usual, I repeatedly call.inc(…)
and finally.finish()
. However, I am typically getting this kind of printout:That is, the estimated total duration makes plenty of sense, except that after calling
finish
it drops to 0. I would expect thatduration
would reflect the real final duration when the progress bar is finished.I guess the problem is around lines 292–297 of
src/state.rs
:It seems to be explicitly returning 0 when
is_finished()
. Is this intentional?The text was updated successfully, but these errors were encountered: