fix metrics sometimes not being updated

This commit is contained in:
Glenn Maynard
2004-01-12 00:31:43 +00:00
parent a1a85c277f
commit 84a8f056d7
+4 -4
View File
@@ -53,7 +53,7 @@ RageTimer g_LastMetricUpdate; /* can't use RageTimer globally */
static void UpdateMetrics() static void UpdateMetrics()
{ {
if( g_LastMetricUpdate.PeekDeltaTime() < 1 ) if( !g_LastMetricUpdate.IsZero() && g_LastMetricUpdate.PeekDeltaTime() < 1 )
return; return;
g_LastMetricUpdate.Touch(); g_LastMetricUpdate.Touch();
@@ -72,6 +72,9 @@ static void UpdateMetrics()
SongManager::SongManager( LoadingWindow *ld ) SongManager::SongManager( LoadingWindow *ld )
{ {
g_LastMetricUpdate.SetZero();
UpdateMetrics();
/* We initialize things that assume they can get at SONGMAN; we only /* We initialize things that assume they can get at SONGMAN; we only
* init one of these, so hook us up to it immediately. */ * init one of these, so hook us up to it immediately. */
SONGMAN = this; SONGMAN = this;
@@ -85,9 +88,6 @@ SongManager::SongManager( LoadingWindow *ld )
SONGMAN = NULL; SONGMAN = NULL;
throw; throw;
} }
g_LastMetricUpdate.SetZero();
UpdateMetrics();
} }
SongManager::~SongManager() SongManager::~SongManager()