From: havoc Date: Wed, 12 Apr 2006 22:40:32 +0000 (+0000) Subject: Sys_Sleep more to save cpu time X-Git-Tag: xonotic-v0.1.0preview~4095 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=74f056c353b56ffa8b6f4ae4e5567b8af2771e95;p=xonotic%2Fdarkplaces.git Sys_Sleep more to save cpu time git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6269 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/host.c b/host.c index 9d7c5583..85be9d5d 100644 --- a/host.c +++ b/host.c @@ -567,7 +567,7 @@ qboolean Host_FilterTime (double time) timeleft = timecap - (realtime - oldrealtime); if (timeleft > 0) { -#if 1 +#if 0 if (timeleft * 1000 >= 10) Sys_Sleep(1); #else @@ -576,7 +576,7 @@ qboolean Host_FilterTime (double time) // try to hit exactly a steady framerate by not sleeping the full amount msleft = (int)floor(timeleft * 1000); if (msleft >= 10) - Sys_Sleep(msleft); + Sys_Sleep(msleft - 9); #endif return false; }