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

Unified Diff: base/time/time.cc

Issue 34623008: Change to calculate the real NTP in TimeTicks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits in Time Created 7 years, 2 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
Index: base/time/time.cc
diff --git a/base/time/time.cc b/base/time/time.cc
index a9e4b1cf90aa61c031feaa05f52a01111090f431..bbed33b131c8726fd99e327e9bc3dc7f28cd0456 100644
--- a/base/time/time.cc
+++ b/base/time/time.cc
@@ -189,6 +189,13 @@ bool Time::FromStringInternal(const char* time_string,
return true;
}
+// static
+TimeTicks TimeTicks::UnixEpoch() {
+ static const TimeTicks ticks_unix_epoch =
jar (doing other things) 2013/10/25 01:13:54 My guess is that you want a lazy singleton (probab
+ TimeTicks::Now() - (Time::Now() - Time::UnixEpoch());
+ return ticks_unix_epoch;
+}
+
// Time::Exploded -------------------------------------------------------------
inline bool is_in_range(int value, int lo, int hi) {
« no previous file with comments | « base/time/time.h ('k') | media/cast/cast.gyp » ('j') | media/cast/cast_ntp_tick_clock.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698