Skip to content

Instantly share code, notes, and snippets.

@TranquilMarmot
Created May 24, 2013 08:49
Show Gist options
  • Save TranquilMarmot/5642194 to your computer and use it in GitHub Desktop.
Save TranquilMarmot/5642194 to your computer and use it in GitHub Desktop.
#include<stdio.h>
#include<time.h>
int main(){
time_t now, then;
time(&now);
int i;
for(i = 0; i < 1000000; i++){
// do nothing?
}
time(&then);
double secs = difftime(now, then);
printf("%d milliseconds passed\n", secs);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment