Link to home
Start Free TrialLog in
Avatar of namrata
namrata

asked on

About timer in MFC

Hello,

I am developing an application in VC++ 5.0/MFC. This application is to be run for 2000 hrs. continuously. I have to take readings periodically using this application. For that i am using StartTimer() and KillTimer(). I want to ask whether they work perfectly for this much long time and also if windows OS is run for 2000 hrs is it ok? Will it cause time lag after some time or not ? Thanks.
Avatar of poohbear_68
poohbear_68
Flag of United States of America image

Timer handlers are not guaranteed to be called.  Depending on the circumstance (e.g. Windows is busy doing something else), they may not be called.  You will want to have the intervals fairly frequent because of this.

I haven't really researched it, but (other than first paragraph) I would think that it should be fairly reliable.

Timers are not precise, so you may wish to check out another method.
Avatar of namrata
namrata

ASKER

Can u suggest any other method?
ASKER CERTIFIED SOLUTION
Avatar of RONSLOW
RONSLOW

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
Avatar of namrata

ASKER

ok. i have to take readings minimum at 1 minute. so accuracy should not be much problem.  What about windows OS? Any problem if it is run for a long time?
You're leaving yourself open for a lot of anti-MS comments here :-)

Windows OS should be fine for long periods.  Win2000 especially as it has been written for use in servers (which are supposed to have very high availability).  I don't thinkg you'll find the OS itself is really a problem.