aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/qps')
-rw-r--r--test/cpp/qps/driver.cc2
-rw-r--r--test/cpp/qps/timer.cc2
-rw-r--r--test/cpp/qps/worker.cc3
3 files changed, 4 insertions, 3 deletions
diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc
index c8cc11e6ab..5597bcd549 100644
--- a/test/cpp/qps/driver.cc
+++ b/test/cpp/qps/driver.cc
@@ -185,7 +185,7 @@ std::unique_ptr<ScenarioResult> RunScenario(
// Let everything warmup
gpr_log(GPR_INFO, "Warming up");
- gpr_timespec start = gpr_now();
+ gpr_timespec start = gpr_now(GPR_CLOCK_REALTIME);
gpr_sleep_until(gpr_time_add(start, gpr_time_from_seconds(warmup_seconds)));
// Start a run
diff --git a/test/cpp/qps/timer.cc b/test/cpp/qps/timer.cc
index d1b6bc1e55..07289f699b 100644
--- a/test/cpp/qps/timer.cc
+++ b/test/cpp/qps/timer.cc
@@ -41,7 +41,7 @@
Timer::Timer() : start_(Sample()) {}
double Timer::Now() {
- auto ts = gpr_now();
+ auto ts = gpr_now(GPR_CLOCK_REALTIME);
return ts.tv_sec + 1e-9 * ts.tv_nsec;
}
diff --git a/test/cpp/qps/worker.cc b/test/cpp/qps/worker.cc
index 14a8b0b089..2bc0a56970 100644
--- a/test/cpp/qps/worker.cc
+++ b/test/cpp/qps/worker.cc
@@ -57,7 +57,8 @@ static void RunServer() {
QpsWorker worker(FLAGS_driver_port, FLAGS_server_port);
while (!got_sigint) {
- gpr_sleep_until(gpr_time_add(gpr_now(), gpr_time_from_seconds(5)));
+ gpr_sleep_until(
+ gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), gpr_time_from_seconds(5)));
}
}