Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -40,8 +40,11 @@
#include <set>
#include <mutex>
// std::this_thread::sleep_for is by default supported since 4.1
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)
// std::this_thread::sleep_for is by default supported since 4.8.1
#define GCC_VERSION (__GNUC__ * 10000 \
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
#if GCC_VERSION >= 40801
#include <chrono>
#include <thread>
#define MYSLEEP(x) std::this_thread::sleep_for(std::chrono::seconds(x))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment