I posted a message last week with respect to the following:
Objective: To calculate the difference between two times (up to the millisecond).
perform a function
calculate difference = time2 - time1
Two people proposed two ways of accomplishing the objective:
1. Using difftime() - difftime(time2, time1)
2. Using clock() - (c2-c1)/(double)CLOCKS_PER_SEC
difftime only has a second resolution, and clock only counts the processor time used by the program. I basically need to count all of the time it takes to perform the function above (to the millisecond). I'm beginning to think this may require assembly code (which is fine). Anybody care to prove me wrong?