aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h
diff options
context:
space:
mode:
Diffstat (limited to 'unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorMacros.h4
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