questions on clock(),time() and difftime() in time.h?
问题 int fib(int n,int a,int b){ if (n==2){ return a+b; } return fib(n-1,b,a+b); } int main() { time_t begin,end; begin = clock(); fib(10000,0,1); end = clock(); printf("%f",difftime(end,begin)); } int main() { time_t begin,end; time(&begin); fib(10000,0,1); time(&end); printf("%f",(double)(end-begin)/CLOCKS_PER_SEC); } 1)First question Why does my first main give prints me a time 288.000000 ,I'm assuming this is 288 milliseconds but in the documentation it is supposed to give me the result in