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

Unified Diff: cc/debug/lap_timer.cc

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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 | « cc/debug/lap_timer.h ('k') | cc/debug/rendering_stats_instrumentation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/lap_timer.cc
diff --git a/cc/debug/lap_timer.cc b/cc/debug/lap_timer.cc
index 10d26f94f4de514b0094b464efeec0dddf7a37f1..347e3a52d66a443ab401643de8d54e3aa0616f58 100644
--- a/cc/debug/lap_timer.cc
+++ b/cc/debug/lap_timer.cc
@@ -10,9 +10,10 @@ namespace cc {
namespace {
-base::TimeTicks Now() {
- return base::TimeTicks::IsThreadNowSupported() ? base::TimeTicks::ThreadNow()
- : base::TimeTicks::Now();
+base::TimeDelta Now() {
+ return base::ThreadTicks::IsSupported()
+ ? base::ThreadTicks::Now() - base::ThreadTicks()
+ : base::TimeTicks::Now() - base::TimeTicks();
}
} // namespace
@@ -54,7 +55,7 @@ void LapTimer::NextLap() {
++num_laps_;
--remaining_no_check_laps_;
if (!remaining_no_check_laps_) {
- base::TimeTicks now = Now();
+ base::TimeDelta now = Now();
accumulator_ += now - start_time_;
start_time_ = now;
remaining_no_check_laps_ = check_interval_;
« no previous file with comments | « cc/debug/lap_timer.h ('k') | cc/debug/rendering_stats_instrumentation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698