Commit 1c21b1cd authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

#29579: sleep_for() issue is for GCC < 4.8.1, not 4.1

parent 475b8e52
...@@ -40,8 +40,11 @@ ...@@ -40,8 +40,11 @@
#include <set> #include <set>
#include <mutex> #include <mutex>
// std::this_thread::sleep_for is by default supported since 4.1 // std::this_thread::sleep_for is by default supported since 4.8.1
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) #define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#if GCC_VERSION >= 40801
#include <chrono> #include <chrono>
#include <thread> #include <thread>
#define MYSLEEP(x) std::this_thread::sleep_for(std::chrono::seconds(x)) #define MYSLEEP(x) std::this_thread::sleep_for(std::chrono::seconds(x))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment