Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(664)

Unified Diff: base/time.cc

Issue 10883061: Add 'base::Time::Max()' to explicitly refer to the end of time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/time.h ('k') | base/time_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time.cc
diff --git a/base/time.cc b/base/time.cc
index f04ebbcbdd4e01dac23f567e81f5dff21916e947..7055311e80e7d53df843b61dd63a67b816a74faa 100644
--- a/base/time.cc
+++ b/base/time.cc
@@ -9,6 +9,8 @@
#include <float.h>
#endif
+#include <limits>
+
#include "base/sys_string_conversions.h"
#include "base/third_party/nspr/prtime.h"
@@ -64,6 +66,11 @@ int64 TimeDelta::InMicroseconds() const {
// Time -----------------------------------------------------------------------
// static
+Time Time::Max() {
+ return Time(std::numeric_limits<int64>::max());
+}
+
+// static
Time Time::FromTimeT(time_t tt) {
if (tt == 0)
return Time(); // Preserve 0 so we can tell it doesn't exist.
« no previous file with comments | « base/time.h ('k') | base/time_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698