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

Unified Diff: cc/debug/rendering_stats_instrumentation.cc

Issue 1122153002: Fixit: Fork base::TimeTicks --> TimeTicks + ThreadTicks + TraceTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FIXIT_timeclasses_1of2
Patch Set: REBASE after it passed CQ but did not commit to tree Created 5 years, 7 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/rendering_stats_instrumentation.h ('k') | cc/scheduler/begin_frame_tracker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/rendering_stats_instrumentation.cc
diff --git a/cc/debug/rendering_stats_instrumentation.cc b/cc/debug/rendering_stats_instrumentation.cc
index 7497c628ed19fa4abbee21bb5558967a79a3d68b..315743b8ffc295bbc9e9b2ddb271803a38e69dec 100644
--- a/cc/debug/rendering_stats_instrumentation.cc
+++ b/cc/debug/rendering_stats_instrumentation.cc
@@ -37,21 +37,21 @@ void RenderingStatsInstrumentation::AccumulateAndClearImplThreadStats() {
impl_thread_rendering_stats_ = RenderingStats();
}
-base::TimeTicks RenderingStatsInstrumentation::StartRecording() const {
+base::TimeDelta RenderingStatsInstrumentation::StartRecording() const {
if (record_rendering_stats_) {
- if (base::TimeTicks::IsThreadNowSupported())
- return base::TimeTicks::ThreadNow();
- return base::TimeTicks::Now();
+ if (base::ThreadTicks::IsSupported())
+ return base::ThreadTicks::Now() - base::ThreadTicks();
+ return base::TimeTicks::Now() - base::TimeTicks();
}
- return base::TimeTicks();
+ return base::TimeDelta();
}
base::TimeDelta RenderingStatsInstrumentation::EndRecording(
- base::TimeTicks start_time) const {
- if (!start_time.is_null()) {
- if (base::TimeTicks::IsThreadNowSupported())
- return base::TimeTicks::ThreadNow() - start_time;
- return base::TimeTicks::Now() - start_time;
+ base::TimeDelta start_time) const {
+ if (start_time != base::TimeDelta()) {
+ if (base::ThreadTicks::IsSupported())
+ return (base::ThreadTicks::Now() - base::ThreadTicks()) - start_time;
+ return (base::TimeTicks::Now() - base::TimeTicks()) - start_time;
}
return base::TimeDelta();
}
« no previous file with comments | « cc/debug/rendering_stats_instrumentation.h ('k') | cc/scheduler/begin_frame_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698