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

Unified Diff: content/child/blink_platform_impl.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 | « content/browser/tracing/trace_message_filter.cc ('k') | content/renderer/devtools/v8_sampling_profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/blink_platform_impl.cc
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc
index d0968a95bd2deb9c2565bb3094ceb18e6632a810..e0c995f9c025f6df6579e856d73c4bd1660122f2 100644
--- a/content/child/blink_platform_impl.cc
+++ b/content/child/blink_platform_impl.cc
@@ -641,8 +641,8 @@ blink::Platform::TraceEventHandle BlinkPlatformImpl::addTraceEvent(
const unsigned char* arg_types,
const unsigned long long* arg_values,
unsigned char flags) {
- base::TimeTicks timestamp_tt = base::TimeTicks::FromInternalValue(
- static_cast<int64>(timestamp * base::Time::kMicrosecondsPerSecond));
+ base::TraceTicks timestamp_tt =
+ base::TraceTicks() + base::TimeDelta::FromSecondsD(timestamp);
base::trace_event::TraceEventHandle handle =
TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_THREAD_ID_AND_TIMESTAMP(
phase, category_group_enabled, name, id,
@@ -678,8 +678,8 @@ blink::Platform::TraceEventHandle BlinkPlatformImpl::addTraceEvent(
}
}
}
- base::TimeTicks timestamp_tt = base::TimeTicks::FromInternalValue(
- static_cast<int64>(timestamp * base::Time::kMicrosecondsPerSecond));
+ base::TraceTicks timestamp_tt =
+ base::TraceTicks() + base::TimeDelta::FromSecondsD(timestamp);
base::trace_event::TraceEventHandle handle =
TRACE_EVENT_API_ADD_TRACE_EVENT_WITH_THREAD_ID_AND_TIMESTAMP(phase,
category_group_enabled,
@@ -1093,8 +1093,7 @@ double BlinkPlatformImpl::monotonicallyIncreasingTime() {
}
double BlinkPlatformImpl::systemTraceTime() {
- return base::TimeTicks::NowFromSystemTraceTime().ToInternalValue() /
- static_cast<double>(base::Time::kMicrosecondsPerSecond);
+ return (base::TraceTicks::Now() - base::TraceTicks()).InSecondsF();
}
void BlinkPlatformImpl::cryptographicallyRandomValues(
« no previous file with comments | « content/browser/tracing/trace_message_filter.cc ('k') | content/renderer/devtools/v8_sampling_profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698