Make it possible to compile with gcc4.6
diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc
index acfaa87..f7537c2 100644
--- a/test/cpp/interop/client.cc
+++ b/test/cpp/interop/client.cc
@@ -38,6 +38,8 @@
#include <string>
#include <thread>
+#include <unistd.h>
+
#include <grpc/grpc.h>
#include <grpc/support/log.h>
#include <gflags/gflags.h>
@@ -313,8 +315,7 @@
GPR_ASSERT(response.payload().body() ==
grpc::string(kResponseMessageSize, '\0'));
gpr_log(GPR_INFO, "received message %d", i);
- std::this_thread::sleep_for(
- std::chrono::milliseconds(kReceiveDelayMilliSeconds));
+ usleep(kReceiveDelayMilliSeconds * 1000);
++i;
}
GPR_ASSERT(kNumResponseMessages == i);
diff --git a/test/cpp/interop/server.cc b/test/cpp/interop/server.cc
index 263bd8e..9810ff6 100644
--- a/test/cpp/interop/server.cc
+++ b/test/cpp/interop/server.cc
@@ -36,6 +36,7 @@
#include <thread>
#include <signal.h>
+#include <unistd.h>
#include <gflags/gflags.h>
#include <grpc/grpc.h>
@@ -222,7 +223,7 @@
std::unique_ptr<Server> server(builder.BuildAndStart());
gpr_log(GPR_INFO, "Server listening on %s", server_address.str().c_str());
while (!got_sigint) {
- std::this_thread::sleep_for(std::chrono::seconds(5));
+ sleep(5);
}
}