From 483aebc27ed79f1477b144add31c6b09c58c2966 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 15 Aug 2002 19:00:31 +0000 Subject: [PATCH] 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 --- sys_linux.c | 3 ++- sys_win.c | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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; -- 2.39.2