Skip to content
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

Progress to exceed real-valued threshold? #221

Open
NAThompson opened this issue Nov 7, 2021 · 0 comments
Open

Progress to exceed real-valued threshold? #221

NAThompson opened this issue Nov 7, 2021 · 0 comments

Comments

@NAThompson
Copy link

NAThompson commented Nov 7, 2021

Hopefully this isn't noise, but after reading the documentation, I didn't see a natural way to create a progress bar which displays progress to exceed a real-valued parameter.

For example, what I would like is something like:

julia> using Unitful
julia> using ProgressMeter
julia> tf = 2.0u"s"
julia> p = ProgressTo(tf, 1)
julia> t = 0.0u"s"
julia> while t < tf
           t += randn()
           update!(p, t)
       end     

The closest thing I found was the ProgressThresh, but this displays progress to going below a certain real value.

Note: I have the following workaround:

julia> n = Int64(round(ustrip(tf)*1000000000000)) # hope this is an integer!
julia> p = Progress(n, 1)

and then make the same conversion with the time.

@NAThompson NAThompson changed the title Progress to a real-valued threshold? Progress to exceed real-valued threshold? Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant