| 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 7f418c85743f558f38da90a4200dcc77a780d822..8940e9ecb472b8b021a9e7270530541ee6f47a0c 100644
|
| --- a/ash/system/chromeos/power/power_status.cc
|
| +++ b/ash/system/chromeos/power/power_status.cc
|
| @@ -117,10 +117,9 @@ void PowerStatus::SplitTimeIntoHoursAndMinutes(const base::TimeDelta& time,
|
| int* minutes) {
|
| DCHECK(hours);
|
| DCHECK(minutes);
|
| - *hours = time.InHours();
|
| - const double seconds =
|
| - (time - base::TimeDelta::FromHours(*hours)).InSecondsF();
|
| - *minutes = static_cast<int>(seconds / 60.0 + 0.5);
|
| + const int total_minutes = static_cast<int>(time.InSecondsF() / 60 + 0.5);
|
| + *hours = total_minutes / 60;
|
| + *minutes = total_minutes % 60;
|
| }
|
|
|
| void PowerStatus::AddObserver(Observer* observer) {
|
|
|