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

Unified Diff: base/time/time.h

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
« no previous file with comments | « no previous file | base/time/time.cc » ('j') | base/time/time.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time.h
diff --git a/base/time/time.h b/base/time/time.h
index 112c14eab51604a3602fd2beadc18cabe66a5f1d..655500e638d48a3e8cbf9b04ebf2bddd7b0efd53 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -604,6 +604,13 @@ class BASE_EXPORT TimeTicks {
return TimeTicks(ticks);
}
+ // Get the TimeTick value at the time of the UnixEpoch. This is useful when
+ // you need to relate the value of TimeTicks to a real time and date.
+ // Note: this function will return the same value during the duration of
+ // the application; however it might change for next run since your TickClock
miu 2013/10/24 21:48:52 nit: For clarity, I would replace the "Note:" text
pwestin 2013/10/24 22:39:52 Done.
+ // might have a different starting point.
+ static TimeTicks UnixEpoch();
+
// Returns the internal numeric value of the TimeTicks object.
// For serializing, use FromInternalValue to reconstitute.
int64 ToInternalValue() const {
« no previous file with comments | « no previous file | base/time/time.cc » ('j') | base/time/time.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698