mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
check for the availability of usleep
This commit is contained in:
parent
d820a6ecee
commit
011b16144e
2 changed files with 4 additions and 0 deletions
|
@ -158,6 +158,8 @@ else
|
|||
AC_C_BIGENDIAN
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS(usleep)
|
||||
|
||||
AC_MSG_CHECKING(for fnmatch)
|
||||
AC_TRY_LINK(
|
||||
[],
|
||||
|
|
|
@ -1452,8 +1452,10 @@ Host_Frame (float time)
|
|||
|
||||
// decide the simulation time
|
||||
if ((sleeptime = Host_SimulationTime (time)) != 0) {
|
||||
#ifdef HAVE_USLEEP
|
||||
if (sleeptime > 0.01) // minimum sleep time
|
||||
usleep((unsigned long)((sleeptime - 0.001) * 1000000));
|
||||
#endif
|
||||
return; // framerate is too high
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue