summaryrefslogtreecommitdiff
path: root/base/time/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/time/time.h')
-rw-r--r--base/time/time.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/base/time/time.h b/base/time/time.h
index ba7be4b8c4..c7e812383a 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -780,13 +780,7 @@ constexpr TimeDelta TimeDelta::Min() {
// static
constexpr TimeDelta TimeDelta::FromDouble(double value) {
- // TODO(crbug.com/612601): Use saturated_cast<int64_t>(value) once we sort out
- // the Min() behavior.
- return value > std::numeric_limits<int64_t>::max()
- ? Max()
- : value < std::numeric_limits<int64_t>::min()
- ? Min()
- : TimeDelta(static_cast<int64_t>(value));
+ return TimeDelta(saturated_cast<int64_t>(value));
}
// static