aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2015-07-31 11:24:06 -0700
committerGravatar Vijay Pai <vpai@google.com>2015-07-31 11:24:06 -0700
commitbc78c2069cc1b86c7faab1d46151199d9ae5aa48 (patch)
treee5cda4897bf166273e8dfbc57fdb03f411d2beaf /test/cpp
parent784005b4a254880723225e34483660c31aae4b8d (diff)
Eliminate use of this_thread::sleep_until
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/qps/client_sync.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc
index 718698bfe1..5d05c914e8 100644
--- a/test/cpp/qps/client_sync.cc
+++ b/test/cpp/qps/client_sync.cc
@@ -45,8 +45,9 @@
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/histogram.h>
-#include <grpc/support/log.h>
#include <grpc/support/host_port.h>
+#include <grpc/support/log.h>
+#include <grpc/support/time.h>
#include <gflags/gflags.h>
#include <grpc++/client_context.h>
#include <grpc++/server.h>
@@ -79,7 +80,9 @@ class SynchronousClient : public Client {
void WaitToIssue(int thread_idx) {
grpc_time next_time;
if (NextIssueTime(thread_idx, &next_time)) {
- std::this_thread::sleep_until(next_time);
+ gpr_timespec next_timespec;
+ TimepointHR2Timespec(next_time, &next_timespec);
+ gpr_sleep_until(next_timespec);
}
}