]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Sys_Sleep more to save cpu time
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 12 Apr 2006 22:40:32 +0000 (22:40 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 12 Apr 2006 22:40:32 +0000 (22:40 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6269 d7cf8633-e32d-0410-b094-e92efae38249

host.c

diff --git a/host.c b/host.c
index 9d7c5583e2b928f962e97d921c5abe4a375f4531..85be9d5d34ec3e572b44a093efbffc7ea688fbbe 100644 (file)
--- 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;
        }