// time.h included
int i = 100000;
clock_t start, finish;
double duration;
printf( "Time to do %ld empty loops is ", i );
start = clock();
while( i-- )
;
finish = clock();
duration = (double)(finish - start) / CLOCKS_PER_SEC;
printf( "%2.1f seconds\n", duration );
Sunday, January 20, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment