Skip to content

Instantly share code, notes, and snippets.

@slembcke
Created May 10, 2010 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slembcke/396267 to your computer and use it in GitHub Desktop.
Save slembcke/396267 to your computer and use it in GitHub Desktop.
struct timeval start_time, end_time;
gettimeofday(&start_time, NULL);
for(int i=0; i<count; i++)
currDemo->updateFunc(i);
gettimeofday(&end_time, NULL);
long millisecs = (end_time.tv_sec - start_time.tv_sec)*1000;
millisecs += (end_time.tv_usec - start_time.tv_usec)/1000;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment