]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
only warn about time stepping backwards if it's more than 10ms
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 15 Aug 2002 19:00:31 +0000 (19:00 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 15 Aug 2002 19:00:31 +0000 (19:00 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2247 d7cf8633-e32d-0410-b094-e92efae38249

sys_linux.c
sys_win.c

index f006b276cd01a383f932d4686ad6202282e061f2..eb2993cb71e509acf62a7f2c3028a5ea01c8679f 100644 (file)
@@ -180,7 +180,8 @@ double Sys_DoubleTime (void)
 
        if (newtime < oldtime)
        {
-               if (newtime < oldtime - 0.001)
+               // warn if it's significant
+               if (newtime - oldtime < -0.01)
                        Con_Printf("Sys_DoubleTime: time stepped backwards (went from %f to %f, difference %f)\n", oldtime, newtime, newtime - oldtime);
        }
        else
index 007dd01a02d62e67e5648ef34aea29baed583088..1479e7c8f9a7ab8a5cdc8fb6a78283a2d0b98bdf 100644 (file)
--- a/sys_win.c
+++ b/sys_win.c
@@ -332,7 +332,11 @@ double Sys_DoubleTime (void)
        }
 
        if (newtime < oldtime)
-               Con_Printf("Sys_DoubleTime: time stepped backwards (went from %f to %f, difference %f)\n", oldtime, newtime, newtime - oldtime);
+       {
+               // warn if it's significant
+               if (newtime - oldtime < -0.01)
+                       Con_Printf("Sys_DoubleTime: time stepped backwards (went from %f to %f, difference %f)\n", oldtime, newtime, newtime - oldtime);
+       }
        else
                curtime += newtime - oldtime;
        oldtime = newtime;