aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/usage_timer.cc
diff options
context:
space:
mode:
authorGravatar vjpai <vpai@google.com>2016-02-24 12:36:15 -0800
committerGravatar vjpai <vpai@google.com>2016-02-24 12:36:15 -0800
commite2d39e08f9d65b89b0e0f842bc8b8431022f1435 (patch)
treeecf548b19d1a336080d86a616c25a99ad7342939 /test/cpp/qps/usage_timer.cc
parent633f7c27616314c2b1cb4cd30704f0cc8bdb1dca (diff)
Timer->UsageTimer consistently
Diffstat (limited to 'test/cpp/qps/usage_timer.cc')
-rw-r--r--test/cpp/qps/usage_timer.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/cpp/qps/usage_timer.cc b/test/cpp/qps/usage_timer.cc
index ee64537fed..6663a9ac10 100644
--- a/test/cpp/qps/usage_timer.cc
+++ b/test/cpp/qps/usage_timer.cc
@@ -37,9 +37,9 @@
#include <sys/resource.h>
#include <sys/time.h>
-Timer::Timer() : start_(Sample()) {}
+UsageTimer::UsageTimer() : start_(Sample()) {}
-double Timer::Now() {
+double UsageTimer::Now() {
auto ts = gpr_now(GPR_CLOCK_REALTIME);
return ts.tv_sec + 1e-9 * ts.tv_nsec;
}
@@ -48,7 +48,7 @@ static double time_double(struct timeval* tv) {
return tv->tv_sec + 1e-6 * tv->tv_usec;
}
-Timer::Result Timer::Sample() {
+UsageTimer::Result UsageTimer::Sample() {
struct rusage usage;
struct timeval tv;
gettimeofday(&tv, NULL);
@@ -61,7 +61,7 @@ Timer::Result Timer::Sample() {
return r;
}
-Timer::Result Timer::Mark() const {
+UsageTimer::Result UsageTimer::Mark() const {
Result s = Sample();
Result r;
r.wall = s.wall - start_.wall;