| Index: base/time/time.h
|
| diff --git a/base/time/time.h b/base/time/time.h
|
| index 1084e9517942f83c6a1a1b2831147ec648384a50..2939116399c2ecf778625241666d28ae142cb8a9 100644
|
| --- a/base/time/time.h
|
| +++ b/base/time/time.h
|
| @@ -129,7 +129,7 @@ class BASE_EXPORT TimeDelta {
|
| // Returns the maximum time delta, which should be greater than any reasonable
|
| // time delta we might compare it to. Adding or subtracting the maximum time
|
| // delta to a time or another time delta has an undefined result.
|
| - static TimeDelta Max();
|
| + static constexpr TimeDelta Max();
|
|
|
| // Returns the internal numeric value of the TimeDelta object. Please don't
|
| // use this and do arithmetic on it, as it is more error prone than using the
|
| @@ -669,6 +669,11 @@ constexpr TimeDelta TimeDelta::FromMicroseconds(int64_t us) {
|
| }
|
|
|
| // static
|
| +constexpr TimeDelta TimeDelta::Max() {
|
| + return TimeDelta(std::numeric_limits<int64_t>::max());
|
| +}
|
| +
|
| +// static
|
| constexpr TimeDelta TimeDelta::FromDouble(double value) {
|
| // TODO(crbug.com/612601): Use saturated_cast<int64_t>(value) once we sort out
|
| // the Min() behavior.
|
|
|