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

Unified Diff: components/startup_metric_utils/browser/startup_metric_utils.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 | « components/scheduler/child/idle_helper.cc ('k') | components/tracing/child_trace_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/startup_metric_utils/browser/startup_metric_utils.cc
diff --git a/components/startup_metric_utils/browser/startup_metric_utils.cc b/components/startup_metric_utils/browser/startup_metric_utils.cc
index 771893626f9892199363dadbf5f339ca359b28b4..3969ed8a94cc70ee552aa861e1943d6f5493c887 100644
--- a/components/startup_metric_utils/browser/startup_metric_utils.cc
+++ b/components/startup_metric_utils/browser/startup_metric_utils.cc
@@ -183,11 +183,11 @@ bool GetHardFaultCountForCurrentProcess(uint32_t* hard_fault_count,
end_time - begin_time) \
TRACE_EVENT_ASYNC_BEGIN_WITH_TIMESTAMP1( \
"startup", basename, 0, \
- StartupTimeToTraceTicks(begin_time).ToInternalValue(), "Temperature", \
+ StartupTimeToTimeTicks(begin_time).ToInternalValue(), "Temperature", \
g_startup_temperature); \
TRACE_EVENT_ASYNC_END_WITH_TIMESTAMP1( \
"startup", basename, 0, \
- StartupTimeToTraceTicks(end_time).ToInternalValue(), "Temperature", \
+ StartupTimeToTimeTicks(end_time).ToInternalValue(), "Temperature", \
g_startup_temperature); \
}
@@ -245,17 +245,17 @@ void RecordHardFaultHistogram(bool is_first_run) {
#endif // defined(OS_WIN)
}
-// Converts a base::Time value to a base::TraceTicks value. The conversion isn't
+// Converts a base::Time value to a base::TimeTicks value. The conversion isn't
// exact, but is within the time delta taken to synchronously resolve
-// base::Time::Now() and base::TraceTicks::Now() which in practice is pretty
+// base::Time::Now() and base::TimeTicks::Now() which in practice is pretty
// much instant compared to multi-seconds startup timings.
// TODO(gab): Find a precise way to do this (http://crbug.com/544131).
-base::TraceTicks StartupTimeToTraceTicks(const base::Time& time) {
+base::TimeTicks StartupTimeToTimeTicks(const base::Time& time) {
// First get a base which represents the same point in time in both units.
// The wall clock time it takes to gather both of these is the precision of
// this method.
static const base::Time time_base = base::Time::Now();
- static const base::TraceTicks trace_ticks_base = base::TraceTicks::Now();
+ static const base::TimeTicks trace_ticks_base = base::TimeTicks::Now();
// Then use the TimeDelta common ground between the two units to make the
// conversion.
« no previous file with comments | « components/scheduler/child/idle_helper.cc ('k') | components/tracing/child_trace_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698