 Chromium Code Reviews
 Chromium Code Reviews Issue 
            143633003:
    Fix rounding of time interval strings  (Closed)
    
  
    Issue 
            143633003:
    Fix rounding of time interval strings  (Closed) 
  | DescriptionFix rounding of time interval strings
Previously, text output for time intervals always was rounded
down. For example, a time interval of 1 min 59 sec was
displayed as "1 min", which was confusing users in some cases.
This CL implements rounding to nearest integer. Some example
outputs are given below.
0.49 sec --> "0 secs"
0.5  sec --> "1 sec"
59.4 sec --> "59 secs"
59.5 sec --> "1 min"
89.9 sec --> "1 min"
90.0 sec --> "2 mins"
59 min   --> "59 mins"
60 min   --> "1 hour"
89 min   --> "1 hour"
90 min   --> "2 hours"
...
BUG=338631
TEST=unit tests updated
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=247948
   Patch Set 1 #
      Total comments: 4
      
     Patch Set 2 : Addressing (most of) Bartosz' concerns #
      Total comments: 18
      
     Patch Set 3 : Re-formatted code according to Bartosz' suggestions #
      Total comments: 2
      
     
 Messages
    Total messages: 10 (0 generated)
     | ||||||||||||||||||||||||||||