check for the availability of usleep

This commit is contained in:
Bill Currie 2001-05-17 18:29:22 +00:00
parent d820a6ecee
commit 011b16144e
2 changed files with 4 additions and 0 deletions

View file

@ -158,6 +158,8 @@ else
AC_C_BIGENDIAN
fi
AC_CHECK_FUNCS(usleep)
AC_MSG_CHECKING(for fnmatch)
AC_TRY_LINK(
[],

View file

@ -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
}