From feb67f67dc3d8d5329e5dda9cac0c96c1b9f03e8 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 20 May 2015 19:23:25 -0700 Subject: 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. --- test/cpp/qps/worker.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/cpp/qps') 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 #include +#include #include #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))); } } -- cgit v1.2.3