From: havoc Date: Thu, 15 Aug 2002 19:00:31 +0000 (+0000) Subject: only warn about time stepping backwards if it's more than 10ms X-Git-Tag: RELEASE_0_2_0_RC1~341 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=483aebc27ed79f1477b144add31c6b09c58c2966;p=xonotic%2Fdarkplaces.git only warn about time stepping backwards if it's more than 10ms git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2247 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sys_linux.c b/sys_linux.c index f006b276..eb2993cb 100644 --- a/sys_linux.c +++ b/sys_linux.c @@ -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 diff --git a/sys_win.c b/sys_win.c index 007dd01a..1479e7c8 100644 --- 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;