I use two different ways to get the time clock () and getLocalTime (), because I want both the processor time spent on my process and the wall clock time spent on this process. I am currently doing this:
printf("CPU Time: %gms \n", (((double)(finish-start)) / CLOCKS_PER_SEC)*1000.0);
printf("Clock Time: %ldms \n", (end.sec-begin.sec)*1000+(end.msec-begin.msec));
but they both give me the exact same result! (~ 30 seconds work on something), and I know that the processor does not spend so much time on the process. Am I using the correct functions? Thank.
source
share