Timers can't be global.

This commit is contained in:
Glenn Maynard
2003-07-13 01:26:30 +00:00
parent dc7182f749
commit 045cbb3984
+2 -3
View File
@@ -9,10 +9,9 @@
/* We only actually get 1000 using SDL. */ /* We only actually get 1000 using SDL. */
#define TIMESTAMP_RESOLUTION 1000000 #define TIMESTAMP_RESOLUTION 1000000
static RageTimer g_Start;
float RageTimer::GetTimeSinceStart() float RageTimer::GetTimeSinceStart()
{ {
static RageTimer g_Start;
return g_Start.Ago(); return g_Start.Ago();
} }
@@ -29,7 +28,7 @@ void RageTimer::Touch()
float RageTimer::Ago() const float RageTimer::Ago() const
{ {
const RageTimer Now; const RageTimer Now;
return Difference(*this, Now); return Now - *this;
} }
float RageTimer::GetDeltaTime() float RageTimer::GetDeltaTime()