From 375a974255ae050d9c7035198e85c7e4e058d324 Mon Sep 17 00:00:00 2001 From: "Dean M. Sands, III" Date: Wed, 14 Aug 2019 09:35:15 -0500 Subject: [PATCH] Adapted sleep function in 'examples/deferred_with_accumulator.cpp' for non-*Nix --- examples/deferred_with_accumulator.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/deferred_with_accumulator.cpp b/examples/deferred_with_accumulator.cpp index 80a9cae8..d114eb2a 100644 --- a/examples/deferred_with_accumulator.cpp +++ b/examples/deferred_with_accumulator.cpp @@ -18,6 +18,8 @@ USA */ +#include +#include #include #include @@ -44,7 +46,8 @@ ssize_t test_callback (std::shared_ptr > closure_data, char* bu std::copy(str.begin(), str.end(), buf); // keep sending reqid - sleep(1); + // sleep(1); ==> adapted for C++11 on non-*Nix systems + std::this_thread::sleep_for(std::chrono::seconds(1)); return (ssize_t)max; }