Timers can't be global.
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user