View Single Post
  #6   Spotlight this post!  
Unread 23-02-2012, 20:54
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Time/timer function

Quote:
Originally Posted by DavisC View Post
So i just add the #define up with the includes and use the function wherever I need to and do the math from there.

Thanks.
That's right. Typically, it looks like this:
Code:
UINT32 startTime = GetMsecTime();
//
// Do something that you want to time.
//
printf("Elapsed time = %d msec\n", GetMsecTime() - startTime);
__________________
Reply With Quote