-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
progress: fix progress to not redraw every time there's new data
I think the idea of the code was try do 30 updates per second even if events arrive at, say, every 20 milliseconds. If we had reset the timer every time we printed, we would otherwise reset the timer every 40 milliseconds and end up with 25 updates per second. However, a bug in the code caused it to print every update because it always set the threshold to print the next update to `now`. I tried to keep what I think was the intent of the original code while fixing the bug.
- Loading branch information
1 parent
4fc539b
commit 27c2882
Showing
2 changed files
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters