| 29 | } |
| 30 | |
| 31 | int TimeDelta::InHours() const { |
| 32 | if (is_max()) { |
| 33 | // Preserve max to prevent overflow. |
| 34 | return std::numeric_limits<int>::max(); |
| 35 | } |
| 36 | return static_cast<int>(delta_ / Time::kMicrosecondsPerHour); |
| 37 | } |
| 38 | |
| 39 | int TimeDelta::InMinutes() const { |
| 40 | if (is_max()) { |