Hello all,
I want to know the time elasped between two functions. The problem that faces me is that CTime, CTimeSpan measures in seconds and the elasped time will be much smaller. What shall I do?:confused:
Printable View
Hello all,
I want to know the time elasped between two functions. The problem that faces me is that CTime, CTimeSpan measures in seconds and the elasped time will be much smaller. What shall I do?:confused:
Hmm...
How about using the profiling feature of VC++? You let VC count each function execution time...
See MSDN for function profiling for details.
Briefly:
It is available in Proffessional and Enterprise editions. For funct. profiling go to Project->Settings, Link tab, General category, Check Enable Profiling, OK [warning: This turns off increm. linking]
Try using GetSystemTime to fill a SYSTEMTIME structure.
There is a wMilliseconds field, so the accuracy should be better than CTime ...
What about GetTickCount or GetSystemTime functions?