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

Unified Diff: gpu/perftests/measurements.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 | « gpu/perftests/measurements.h ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/perftests/measurements.cc
diff --git a/gpu/perftests/measurements.cc b/gpu/perftests/measurements.cc
index 47ef28e286b518dff2a2c507c1b5753896616a05..06a672ba31906dbac59034657e2df27f09edf38f 100644
--- a/gpu/perftests/measurements.cc
+++ b/gpu/perftests/measurements.cc
@@ -55,12 +55,12 @@ Measurement::~Measurement() {
MeasurementTimers::MeasurementTimers(gfx::GPUTimingClient* gpu_timing_client)
: wall_time_start_(), cpu_time_start_(), gpu_timer_() {
DCHECK(gpu_timing_client);
- wall_time_start_ = base::TimeTicks::NowFromSystemTraceTime();
- if (base::TimeTicks::IsThreadNowSupported()) {
- cpu_time_start_ = base::TimeTicks::ThreadNow();
+ wall_time_start_ = base::TraceTicks::Now();
+ if (base::ThreadTicks::IsSupported()) {
+ cpu_time_start_ = base::ThreadTicks::Now();
} else {
static bool logged_once = false;
- LOG_IF(WARNING, !logged_once) << "ThreadNow not supported.";
+ LOG_IF(WARNING, !logged_once) << "ThreadTicks not supported.";
logged_once = true;
}
@@ -71,9 +71,9 @@ MeasurementTimers::MeasurementTimers(gfx::GPUTimingClient* gpu_timing_client)
}
void MeasurementTimers::Record() {
- wall_time_ = base::TimeTicks::NowFromSystemTraceTime() - wall_time_start_;
- if (base::TimeTicks::IsThreadNowSupported()) {
- cpu_time_ = base::TimeTicks::ThreadNow() - cpu_time_start_;
+ wall_time_ = base::TraceTicks::Now() - wall_time_start_;
+ if (base::ThreadTicks::IsSupported()) {
+ cpu_time_ = base::ThreadTicks::Now() - cpu_time_start_;
}
if (gpu_timer_.get()) {
gpu_timer_->End();
@@ -84,7 +84,7 @@ Measurement MeasurementTimers::GetAsMeasurement(const std::string& name) {
DCHECK_NE(base::TimeDelta(),
wall_time_); // At least wall_time_ has been set.
- if (!base::TimeTicks::IsThreadNowSupported()) {
+ if (!base::ThreadTicks::IsSupported()) {
cpu_time_ = base::TimeDelta::FromMicroseconds(-1);
}
int64 gpu_time = -1;
« no previous file with comments | « gpu/perftests/measurements.h ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698