Hi everybody,
I can't understand why I can't get information from clock(). Everithing the value =0.
Here is an example:
-------------------------------------------------------------
#include <stdio.h> #include <time.h> /* Need time.h in order to call clock() */ int main() { clock_t start, stop, overhead; start = clock(); /* Calculate the overhead of calling clock */ stop = clock(); /* and subtract this amount from the results. */ overhead = stop − start; start = clock(); /* Function or Code Region to time goes here */ stop = clock(); printf(”cycles: %ld\n”,(long)(stop − start – overhead)); return(0); } ---------------------------------------------------- What I do wrong? Please help me. Thanks a lot.