diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-20 22:12:07 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-20 23:24:19 +0200 |
commit | e258767f32bbafef9f862209aa8868342e946975 (patch) | |
tree | d739dee2f1e403cb2233bce643f0e8b84a747d3b | |
parent | 367aabfdb598acc30c66f0a3127c6b58068c6eef (diff) |
compat/sleep: fix namespace fuckup
-rw-r--r-- | opentrack-compat/sleep.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/opentrack-compat/sleep.hpp b/opentrack-compat/sleep.hpp index 0a551dcc..d4956e79 100644 --- a/opentrack-compat/sleep.hpp +++ b/opentrack-compat/sleep.hpp @@ -1,20 +1,21 @@ #pragma once -namespace portable -{ #ifdef _WIN32 # include <windows.h> - +namespace portable +{ inline void sleep(unsigned milliseconds) { Sleep(milliseconds); } +} #else - #include <unistd.h> +# include <unistd.h> +namespace portable { inline void sleep(unsigned milliseconds) { usleep(milliseconds * 1000U); // takes microseconds } -#endif } +#endif |