From 045cbb3984d9622409fab9114f4cae627181224d Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 13 Jul 2003 01:26:30 +0000 Subject: [PATCH] Timers can't be global. --- stepmania/src/RageTimer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stepmania/src/RageTimer.cpp b/stepmania/src/RageTimer.cpp index 1828815c2b..215886aa19 100644 --- a/stepmania/src/RageTimer.cpp +++ b/stepmania/src/RageTimer.cpp @@ -9,10 +9,9 @@ /* We only actually get 1000 using SDL. */ #define TIMESTAMP_RESOLUTION 1000000 -static RageTimer g_Start; - float RageTimer::GetTimeSinceStart() { + static RageTimer g_Start; return g_Start.Ago(); } @@ -29,7 +28,7 @@ void RageTimer::Touch() float RageTimer::Ago() const { const RageTimer Now; - return Difference(*this, Now); + return Now - *this; } float RageTimer::GetDeltaTime()