| 21 | } |
| 22 | |
| 23 | int TimeDelta::InDays() const { |
| 24 | if (is_max()) { |
| 25 | // Preserve max to prevent overflow. |
| 26 | return std::numeric_limits<int>::max(); |
| 27 | } |
| 28 | return static_cast<int>(delta_ / Time::kMicrosecondsPerDay); |
| 29 | } |
| 30 | |
| 31 | int TimeDelta::InHours() const { |
| 32 | if (is_max()) { |