mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
Use nanosleep instead of usleep
git-svn-id: https://svn.eduke32.com/eduke32@8168 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
ad6d94b0f5
commit
91fde580ce
1 changed files with 4 additions and 3 deletions
|
@ -92,10 +92,11 @@ static inline void idle_waitevent(void)
|
||||||
|
|
||||||
static inline void idle(int const msec = 1)
|
static inline void idle(int const msec = 1)
|
||||||
{
|
{
|
||||||
#ifndef _WIN32
|
#ifdef _WIN32
|
||||||
usleep(msec * 1000);
|
|
||||||
#else
|
|
||||||
Sleep(msec);
|
Sleep(msec);
|
||||||
|
#else
|
||||||
|
timespec const req = { 0, msec * 1000000 };
|
||||||
|
do { } while (nanosleep(&req, &req));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue