Commit 12916575 authored by Gargaj's avatar Gargaj
Browse files

retain a bit more precision in the timer

parent fc8f250e
...@@ -4,6 +4,7 @@ namespace Timer ...@@ -4,6 +4,7 @@ namespace Timer
{ {
LARGE_INTEGER LastPCV = { 0 } ; LARGE_INTEGER LastPCV = { 0 } ;
double currentTime = 0.0; double currentTime = 0.0;
double startTime = 0.0;
double _Time() double _Time()
{ {
...@@ -21,13 +22,13 @@ namespace Timer ...@@ -21,13 +22,13 @@ namespace Timer
return currentTime * 1000.0f; return currentTime * 1000.0f;
} }
float startTime = 0.0;
void Start() void Start()
{ {
startTime = (float)_Time(); startTime = (float)_Time();
} }
float GetTime() float GetTime()
{ {
return (float)_Time() - startTime; return (float) ( _Time() - startTime );
} }
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment