aboutsummaryrefslogblamecommitdiff
path: root/Source/Timer.cpp
blob: ce124815ee274d5a25d1c3373be88560d544b54a (plain) (tree)
1
2
3
4
                      
                   

                                                






















                                                                                                        
/**> HEADER FILES <**/
#include <string.h>
#include "Timer.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);
}