Beyond Verses

My blog that specializes in Space Science and latest news from NASA

Saturday, October 11, 2008

C++ Timing

#include <stdio.h>
#include <time.h>

int main() {
clock_t start = clock();
/* The program code is here */
printf("Time elapsed: %f\n", ((double)clock() - start) / CLOCKS_PER_SEC);

return 0;
}

2 comments: