summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-05-22 11:52:12 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-05-22 11:52:12 +0200
commit2c6baff24800711e61cdbbc43e97bfc270e49419 (patch)
tree1e96024731b9d30703d45472803d722963119b67
parent1983bf2e3a8db6036c7460d4b99b6b6f0521bc37 (diff)
compat/sleep: include headers outside namespace scope
-rw-r--r--opentrack-compat/sleep.hpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/opentrack-compat/sleep.hpp b/opentrack-compat/sleep.hpp
index e7c70285..fab27286 100644
--- a/opentrack-compat/sleep.hpp
+++ b/opentrack-compat/sleep.hpp
@@ -1,20 +1,20 @@
#pragma once
-namespace portable
-{
#ifdef _WIN32
# include <windows.h>
+#else
+# include <unistd.h>
+#endif
- template<typename = void>
- void sleep(unsigned milliseconds)
+namespace portable
+{
+#ifdef _WIN32
+ inline void sleep(unsigned milliseconds)
{
Sleep(milliseconds);
}
#else
- #include <unistd.h>
-
- template<typename = void>
- void sleep(unsigned milliseconds)
+ inline void sleep(unsigned milliseconds)
{
usleep(milliseconds * 1000U); // takes microseconds
}