Chromium Code Reviews| Index: base/time.h |
| diff --git a/base/time.h b/base/time.h |
| index 4d9bf350c598c336ed8e2c81b8bf65dadbd9ed4d..ceed500f5640286f8ac06c4e5e1c58bdedd0f51f 100644 |
| --- a/base/time.h |
| +++ b/base/time.h |
| @@ -45,6 +45,8 @@ |
| #include <windows.h> |
| #endif |
| +#include <limits> |
| + |
| namespace base { |
| class Time; |
| @@ -246,6 +248,11 @@ class BASE_EXPORT Time { |
| return us_ == 0; |
| } |
| + // Returns true if the time object is the maximum time. |
| + bool is_max() const { |
| + return us_ == std::numeric_limits<int64>::max(); |
| + } |
| + |
| // Returns the time for epoch in Unix-like system (Jan 1, 1970). |
| static Time UnixEpoch(); |