diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-12-09 15:12:24 -0800 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2016-12-09 15:12:24 -0800 |
commit | 76fca221347339e210ba3a24d2739d8dd147c15c (patch) | |
tree | 982267b515d3465d8771b6759ec4b4070241e982 /unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h | |
parent | 4deafd35b75cde9c9d40360a37c364594fd8161a (diff) |
Use a more accurate timer to sleep on Linux systems.
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h')
-rw-r--r-- | unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h b/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h index 090e7a835..f92e39d69 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h @@ -53,8 +53,10 @@ #if EIGEN_OS_WIN || EIGEN_OS_WIN64 #define EIGEN_SLEEP(n) Sleep(n) +#elif EIGEN_OS_GNULINUX +#define EIGEN_SLEEP(n) usleep(n * 1000); #else -#define EIGEN_SLEEP(n) sleep(n*1000) +#define EIGEN_SLEEP(n) sleep(std::max<unsigned>(1, n/1000)) #endif #endif |