-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Increase the time resolution in rate mode
Times are measured using time(), which has a one second resolution. Because of this, ttyplot can give vastly underestimated rates if data points arrive faster than once a second. Increase the time resolution by using gettimeofday() instead of time(). Also, move the computation of the rates out of the main loop, into their own function, in order to improve readability.
- Loading branch information
1 parent
8d24130
commit 2176376
Showing
1 changed file
with
38 additions
and
39 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