diff options
author | David Garcia Quintas <dgq@google.com> | 2015-05-20 19:23:25 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2015-05-20 23:13:17 -0700 |
commit | feb67f67dc3d8d5329e5dda9cac0c96c1b9f03e8 (patch) | |
tree | 7a0122578898b6a03ce027485c69eee88f42e03a /test/cpp/qps | |
parent | 2c523e5f7d88830a6860b438f5d7ae803cb6e91a (diff) |
Replaced std::this_thread::sleep_for for gpr_sleep_until.
std::this_thread::sleep_for isn't available in gcc <= 4.6 (4.7?) nor
VS2010.
Diffstat (limited to 'test/cpp/qps')
-rw-r--r-- | test/cpp/qps/worker.cc | 3 |
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))); } } |