Link to home
Start Free TrialLog in
Avatar of guranimo
guranimo

asked on

Process Timing

I am working on some realtime data acquisition and I want to time a preocess in my program. I need to know how long it takes to Invalidate a whole screen and if I wrote a function how long it takes to process that function..How do I do that ?
Avatar of psdavis
psdavis
Flag of United States of America image

Have you looked at the profiling option available for VC5?  It's not overly exciting but it can give you some of the information you might be looking for.

Phillip
ASKER CERTIFIED SOLUTION
Avatar of jeremydavis
jeremydavis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
*Probably* a nieve answer.  If I'm not mistaken, the OnTimer function is always the last on the stack of things to do.  You'd probably not get any responses at all.

Phillip
Avatar of jeremydavis
jeremydavis

If you do find the OnTimer last on the stack you could always use the old favourite PeekAndPmup to allow processing allotment for the timer
I'd still doubt that it would work.
Another function, GetTickCount(), may do better job than SetTimer(), because the former is from the system clock and supposed to be very accurate. However, if you need a stopwatch with time resolution better than 1 msec, both GetTickCount() and SetTimer() are out of scope. For win95/98, the time resolution of SetTimer() is around 20-50 msec, according to my experiments (somebody corrects me if I am wrong).
Thank you tsauy.  That's what I was thinking of!