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

Unified Diff: ui/events/latency_info.cc

Issue 1424703003: Kills TraceTicks, which was functionally the same as TimeTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed win compile error. Created 5 years, 1 month 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 | « ppapi/shared_impl/ppb_trace_event_impl.cc ('k') | ui/gl/angle_platform_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/latency_info.cc
diff --git a/ui/events/latency_info.cc b/ui/events/latency_info.cc
index 88e413fa1bf92c5d84faef627f4e17a822f4c553..e8bdbd373d48374f37b9e077eb79c39fd84f7bf2 100644
--- a/ui/events/latency_info.cc
+++ b/ui/events/latency_info.cc
@@ -244,17 +244,9 @@ void LatencyInfo::AddLatencyNumberWithTimestampImpl(
FindLatency(INPUT_EVENT_LATENCY_UI_COMPONENT,
0,
&begin_component)) {
- // The timestamp stored in ORIGINAL/UI_COMPONENT is using clock
- // CLOCK_MONOTONIC while TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP0
- // expects timestamp using CLOCK_MONOTONIC or CLOCK_SYSTEM_TRACE (on
- // CrOS). So we need to adjust the diff between in CLOCK_MONOTONIC and
- // CLOCK_SYSTEM_TRACE. Note that the diff is drifting overtime so we
- // can't use a static value.
- base::TimeDelta diff = (base::TimeTicks::Now() - base::TimeTicks()) -
- (base::TraceTicks::Now() - base::TraceTicks());
- ts = (begin_component.event_time - diff).ToInternalValue();
+ ts = begin_component.event_time.ToInternalValue();
} else {
- ts = base::TraceTicks::Now().ToInternalValue();
+ ts = base::TimeTicks::Now().ToInternalValue();
}
if (trace_name_str) {
« no previous file with comments | « ppapi/shared_impl/ppb_trace_event_impl.cc ('k') | ui/gl/angle_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698