Hi all
I've been using Red Hat Linux gcc to compile my C program.
I've been trying to measure my function time by using <time.h>
:insertOutput:Code:#include <time.h> int main() { clock_t t0,t1; while(1) { t0=clock(); ... ... add(a,b) ... t1=clock() printf("%ld,%ld\n",t0,t1); } }
0,0
0,0
...
...
10000,10000
10000,10000
...
...
20000,20000
20000,20000...
It almost looks as if it's been rounded up to 5th digit.
This result stays doesn't matter how far apart i put the two clock() points.
Could you give me a suggestion on what I might be doing wrong?
Thank you very much.