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

Unified Diff: ui/events/latency_info.cc

Issue 1121463005: Fixit: Split base::TimeTicks --> TimeTicks + ThreadTicks + TraceTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More Windows compile fixes. Created 5 years, 8 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 96fe74c166c96f206ee6d55d7cd6040bc241c0d4..c10c6048bae035d55222c5622f53ad5a94b3d536 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