mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +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)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
usleep(msec * 1000);
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
Sleep(msec);
|
||||
#else
|
||||
timespec const req = { 0, msec * 1000000 };
|
||||
do { } while (nanosleep(&req, &req));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue