mirror of
https://github.com/verigak/progress.git
synced 2025-12-08 19:33:24 +00:00
When the progress bar is updated frequently (every few milliseconds), the eta can change so quickly that it's impossible to read. This commit updates the average while sma_window is being filled, then after every second. This means we're calling monotonic/time often, but those calls take less than 100 nsec per loop on Linux, Windows and macOS [0], which is equivalent to one attribute lookup or two. [0]: https://github.com/python-trio/trio/issues/33