Chromium Code Reviews| Index: runtime/platform/globals.h |
| =================================================================== |
| --- runtime/platform/globals.h (revision 33466) |
| +++ runtime/platform/globals.h (working copy) |
| @@ -326,13 +326,13 @@ |
| kMicrosecondsPerSecond); |
| // Helpers to round micro second times to human understandable values. |
| -inline double RoundMicrosecondsToSeconds(int64_t micros) { |
| +inline int64_t RoundMicrosecondsToSeconds(int64_t micros) { |
|
Ivan Posva
2014/03/10 13:00:36
We should keep these as double and drop the roundi
|
| const int k1M = 1000000; // Converting us to secs. |
| - return static_cast<double>(micros + (k1M >> 1)) / k1M; |
| + return (micros + (k1M >> 1)) / k1M; |
| } |
| -inline double RoundMicrosecondsToMilliseconds(int64_t micros) { |
| - const int k1K = 1000; // Conversting us to ms. |
| - return static_cast<double>(micros + (k1K >> 1)) / k1K; |
| +inline int64_t RoundMicrosecondsToMilliseconds(int64_t micros) { |
|
Ivan Posva
2014/03/10 13:00:36
ditto.
|
| + const int k1K = 1000; // Converting us to ms. |
| + return (micros + (k1K >> 1)) / k1K; |
| } |
| // A macro to disallow the copy constructor and operator= functions. |