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

Unified Diff: ui/gfx/frame_time.h

Issue 797893003: [Windows] One TimeTicks clock: efficient/reliable high-res, with low-res fallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 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_win.cc ('K') | « base/time/time_win_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/frame_time.h
diff --git a/ui/gfx/frame_time.h b/ui/gfx/frame_time.h
index dd00fbfdd5ddfa908cdacc35ae9535a4070e1617..58b27cb05773b9a4ff1c9943eef14920661b6b56 100644
--- a/ui/gfx/frame_time.h
+++ b/ui/gfx/frame_time.h
@@ -15,8 +15,6 @@ namespace gfx {
class FrameTime {
public:
static base::TimeTicks Now() {
- if (TimestampsAreHighRes())
- return base::TimeTicks::HighResNow();
return base::TimeTicks::Now();
}
@@ -29,8 +27,10 @@ class FrameTime {
static bool TimestampsAreHighRes() {
#if defined(OS_WIN)
- return base::TimeTicks::IsHighResClockWorking();
+ return base::TimeTicks::IsHighResolution();
#else
+ // TODO(miu): Mac/Linux always provide high-resolution timestamps. Consider
+ // returning base::TimeTicks::IsHighResolution() for all platforms.
return false;
#endif
}
« base/time/time_win.cc ('K') | « base/time/time_win_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698