blob: 5360e5f1211f50914669c0901da9529a1818de1b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/**> HEADER FILES <**/
#include "Timer.h"
#include <string.h>
/********************> Timer <*****/
void TimerInit(timer* theTimer)
{
UnsignedWide ms;
Microseconds(&ms);
memset(theTimer, 0, sizeof(timer));
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);
}
|