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

Unified Diff: ui/events/latency_info.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
Index: ui/events/latency_info.cc
diff --git a/ui/events/latency_info.cc b/ui/events/latency_info.cc
index d815790649ad53dc6bfe46ea36ec5d6180324ab1..54acb7f8713e0a9b9477ded82316d2e57f88891c 100644
--- a/ui/events/latency_info.cc
+++ b/ui/events/latency_info.cc
@@ -281,11 +281,11 @@ void LatencyInfo::AddLatencyNumberWithTimestampImpl(
// 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.
- int64 diff = base::TimeTicks::Now().ToInternalValue() -
- base::TimeTicks::NowFromSystemTraceTime().ToInternalValue();
- ts = begin_component.event_time.ToInternalValue() - diff;
+ base::TimeDelta diff = (base::TimeTicks::Now() - base::TimeTicks()) -
+ (base::TraceTicks::Now() - base::TraceTicks());
+ ts = (begin_component.event_time - diff).ToInternalValue();
} else {
- ts = base::TimeTicks::NowFromSystemTraceTime().ToInternalValue();
+ ts = base::TraceTicks::Now().ToInternalValue();
}
if (trace_name_str) {
« no previous file with comments | « sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc ('k') | ui/gl/angle_platform_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698