Originally Posted by
zacs7
is 15/15 not 1 ?
Not when you're this tired it's not.
[edit]
Ah, it finally finished, and I finally got something other than 0.
Code:
#include <stdio.h>
#include <time.h>
int main ( void )
{
clock_t start, end;
unsigned int x=1;
/* Start the timer */
start = clock();
while( x++ )
putchar( '.' );
printf ( "Please wait a few moments and hit return\n" );
getchar();
/* End the timer */
end = clock();
/* Print out the difference */
printf ( "The interval was: %f seconds\n",
(double)(( end - start ) / (double)CLOCKS_PER_SEC ) );
printf ( "start %d, end %d, CLOCKS_PER_SEC %d\n", start, end, CLOCKS_PER_SEC );
return 0;
}
/*
My output:
....four billion.....Please wait a few moments and hit return
The interval was 395.422000 seconds
start 15, end 395437, CLOCKS_PER_SEC 1000
*/
Which is clearly wrong, because I drove to the store while it was running for ~45 minutes or more.
[/edit]
Quzah.