paul / progress_bar

A Ruby terminal progress_bar
Do What The F*ck You Want To Public License
623 stars 49 forks source link

Rate becomes inaccurate when count > max #19

Closed JustinLove closed 10 years ago

JustinLove commented 11 years ago

I used to be able to use the rate display for a download with an unknown size. However, now it appears that my choices are to specify 1, and get a rate that asymptotically approaches 0, or something random like 10**10 (Infinity doesn't seem to work)

paul commented 11 years ago

I never really intended for it to be used for unknown quantities, but I can see how it could be useful when leaving off the progress meter from the output. I don't use it that way, but I'd happily accept a pull request that fixes it, along with an additional test to ensure it doesn't happen again.