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

Unified Diff: base/time/time_win.cc

Issue 1824673002: time: Add a static TimeTicks method that returns the underlying clock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use IsHighResolution Created 4 years, 9 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/time_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time_win.cc
diff --git a/base/time/time_win.cc b/base/time/time_win.cc
index dc968ad63980edbbe0280519a654447c121a74ae..59d4de6c535fcec566f6766dd09ab2fe88b3a51e 100644
--- a/base/time/time_win.cc
+++ b/base/time/time_win.cc
@@ -512,6 +512,12 @@ bool TimeTicks::IsHighResolution() {
}
// static
+TimeTicks::Clock TimeTicks::GetClock() {
+ return IsHighResolution() ?
+ Clock::WIN_QPC : Clock::WIN_ROLLOVER_PROTECTED_TIME_GET_TIME;
+}
+
+// static
ThreadTicks ThreadTicks::Now() {
DCHECK(IsSupported());
« no previous file with comments | « base/time/time_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698