Index: ash/system/chromeos/power/power_status.cc |
diff --git a/ash/system/chromeos/power/power_status.cc b/ash/system/chromeos/power/power_status.cc |
index 0283a0c3fece1e9faca6ad44302b86019b1ba79f..6b05401891118bd8cf960948af14c78a5d5d37fc 100644 |
--- a/ash/system/chromeos/power/power_status.cc |
+++ b/ash/system/chromeos/power/power_status.cc |
@@ -112,7 +112,9 @@ void PowerStatus::SplitTimeIntoHoursAndMinutes(const base::TimeDelta& time, |
DCHECK(hours); |
DCHECK(minutes); |
*hours = time.InHours(); |
- *minutes = (time - base::TimeDelta::FromHours(*hours)).InMinutes(); |
+ const double seconds = |
James Cook
2013/10/22 00:32:40
nit: Do you want to comment either here or in the
Daniel Erat
2013/10/22 03:22:05
Sure, updated the comment in the header.
|
+ (time - base::TimeDelta::FromHours(*hours)).InSecondsF(); |
+ *minutes = static_cast<int>(seconds / 60.0 + 0.5); |
} |
void PowerStatus::AddObserver(Observer* observer) { |