aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/qps/worker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/qps/worker.cc')
-rw-r--r--test/cpp/qps/worker.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/cpp/qps/worker.cc b/test/cpp/qps/worker.cc
index 281c617382..8c82bce8f2 100644
--- a/test/cpp/qps/worker.cc
+++ b/test/cpp/qps/worker.cc
@@ -37,6 +37,7 @@
#include <thread>
#include <grpc/grpc.h>
+#include <grpc/support/time.h>
#include <gflags/gflags.h>
#include "qps_worker.h"
@@ -56,7 +57,7 @@ static void RunServer() {
QpsWorker worker(FLAGS_driver_port, FLAGS_server_port);
while (!got_sigint) {
- std::this_thread::sleep_for(std::chrono::seconds(5));
+ gpr_sleep_until(gpr_time_add(gpr_now(), gpr_time_from_seconds(5)));
}
}