diff options
Diffstat (limited to 'src/Timer.cpp')
-rw-r--r-- | src/Timer.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/Timer.cpp b/src/Timer.cpp index 80cc5f9..869c154 100644 --- a/src/Timer.cpp +++ b/src/Timer.cpp @@ -1,28 +1,26 @@ /**> HEADER FILES <**/ #include <string.h> -#include "Timer.h" +#include "Timer.h" #include "Support.h" - /********************> Timer <*****/ void TimerInit(timer* theTimer) { - UnsignedWide ms; + UnsignedWide ms; + + Microseconds(&ms); - Microseconds(&ms); - - memset(theTimer, 0, sizeof(timer)); + memset(theTimer, 0, sizeof(timer)); - theTimer->mm_timer_start = ms.lo; - theTimer->mm_timer_elapsed = theTimer->mm_timer_start; + theTimer->mm_timer_start = ms.lo; + theTimer->mm_timer_elapsed = theTimer->mm_timer_start; } float TimerGetTime(timer* theTimer) { UnsignedWide ms; - + Microseconds(&ms); - - + return( (float) (ms.lo - theTimer->mm_timer_start) * 1000.0f); } |