aboutsummaryrefslogblamecommitdiff
path: root/Source/Timer.cpp
blob: 5360e5f1211f50914669c0901da9529a1818de1b (plain) (tree)

























                                                                                                        
/**> 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);
}