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

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: 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
« base/time/time.h ('K') | « base/time/time.h ('k') | media/cast/cast.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time.cc
diff --git a/base/time/time.cc b/base/time/time.cc
index a9e4b1cf90aa61c031feaa05f52a01111090f431..820d12f42349d8efb17c0ed97b8a28847d9738d4 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
miu 2013/10/24 21:48:52 Remove leading space.
pwestin 2013/10/24 22:39:52 Done.
+TimeTicks TimeTicks::UnixEpoch() {
+ static const TimeTicks ticks_unix_epoch =
+ TimeTicks::Now() - (Time::Now() - Time::UnixEpoch());
+ return ticks_unix_epoch;
+}
+
// Time::Exploded -------------------------------------------------------------
inline bool is_in_range(int value, int lo, int hi) {
« base/time/time.h ('K') | « base/time/time.h ('k') | media/cast/cast.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698