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

Unified Diff: base/message_loop/message_pump_perftest.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 | « no previous file | base/threading/thread_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_pump_perftest.cc
diff --git a/base/message_loop/message_pump_perftest.cc b/base/message_loop/message_pump_perftest.cc
index 0bf3d0ca9421ff865eff73d0a125e91e0a10a261..7d833befa6158a33b5e64810a928c85abf547798 100644
--- a/base/message_loop/message_pump_perftest.cc
+++ b/base/message_loop/message_pump_perftest.cc
@@ -29,9 +29,9 @@ class ScheduleWorkTest : public testing::Test {
void Schedule(int index) {
base::TimeTicks start = base::TimeTicks::Now();
- base::TimeTicks thread_start;
- if (TimeTicks::IsThreadNowSupported())
- thread_start = base::TimeTicks::ThreadNow();
+ base::ThreadTicks thread_start;
+ if (ThreadTicks::IsSupported())
+ thread_start = base::ThreadTicks::Now();
base::TimeDelta minimum = base::TimeDelta::Max();
base::TimeDelta maximum = base::TimeDelta();
base::TimeTicks now, lastnow = start;
@@ -49,9 +49,9 @@ class ScheduleWorkTest : public testing::Test {
} while (now - start < base::TimeDelta::FromSeconds(kTargetTimeSec));
scheduling_times_[index] = now - start;
- if (TimeTicks::IsThreadNowSupported())
+ if (ThreadTicks::IsSupported())
scheduling_thread_times_[index] =
- base::TimeTicks::ThreadNow() - thread_start;
+ base::ThreadTicks::Now() - thread_start;
min_batch_times_[index] = minimum;
max_batch_times_[index] = maximum;
target_message_loop()->PostTask(FROM_HERE,
@@ -139,7 +139,7 @@ class ScheduleWorkTest : public testing::Test {
max_batch_time.InMicroseconds() / static_cast<double>(kBatchSize),
"us/task",
false);
- if (TimeTicks::IsThreadNowSupported()) {
+ if (ThreadTicks::IsSupported()) {
perf_test::PrintResult(
"task",
"_thread_time",
« no previous file with comments | « no previous file | base/threading/thread_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698