-
time functions
why does this short piece of code result in a spectacular loop, followed by my crashed computer? I am using miracle c compiler:
#include <stdio.h>
#include <time.h>
main()
{
printf("1234");
printf("\nProgram execution time using clock() = %ld hundredths of a second.", clock());
return(0);
}
many thanks to the person who canhelp!!:)
-
A spectacular loop? I compiled, using GCC, and had no problems with it.
Perhaps there is some problem with the clock() function, according to the standard the return value of the function is of type clock_t, but this is implementation defined. Which means, how this type is implemented, depends on how the manufacturer of the compiler implemented it.