-
-
Notifications
You must be signed in to change notification settings - Fork 439
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite Row_printTime() with various improvements
* Change variable types of time values from signed to unsigned. * Change variable naming for consistency: `totalMinutes`, `totalHours`, `totalDays` for total values and `minutes`, `hours`, `days`, etc. for remainder values. (`years` remains an exception as there is no larger unit than years) * Use `unsigned long long` type for `years` value to prevent a potential overflow. * The time units are now evaluated from small to large, in the hopes that small values would print faster. (There is no performance test for this claim.) * The days unit is now printed when `totalHours` is at least 24. (Issue #1317) There is room in the new code to revert to the old threshold (totalHours < 2400). Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
- Loading branch information
1 parent
e9d95e2
commit 33ecaf0
Showing
1 changed file
with
50 additions
and
67 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