WaitTime fix
This commit is contained in:
parent
a362ad1001
commit
d331278450
|
|
@ -1689,7 +1689,7 @@ void WaitTime(double seconds)
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
Sleep((unsigned long)(sleepSeconds*1000.0));
|
Sleep((unsigned long)(sleepSeconds*1000.0));
|
||||||
#endif
|
#endif
|
||||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__)
|
#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__) || defined(__wasi__)
|
||||||
struct timespec req = { 0 };
|
struct timespec req = { 0 };
|
||||||
time_t sec = sleepSeconds;
|
time_t sec = sleepSeconds;
|
||||||
long nsec = (sleepSeconds - sec)*1000000000L;
|
long nsec = (sleepSeconds - sec)*1000000000L;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user