-
C++ Timer
Hi, I need to make a timing device in C++ which calculates the time it takes for two different inputs...I used difftime(end, start) function to find the time diff, in seconds, but, it only gives time difference of up to 1 seconds accuracy. I need a timing device which can find time variance with more accuracy...like upto one tenth of a second..or one hundreadth of a second.
Thanks,
Bye MShrestha
-
use the clock() function declared in time.h it usually returns the time in milliseconds(1/1000th a second), to collect the time values then subtract them appripriatly to get the time passed.