#Windows Timer interrupts
3 messages in this thread
We are using windows timer function to trigger time based routines at intervals
of 1 minute. Some times the interrupts are not coming at the intended time. How
can we get the interrupts at intended time. Example: Interrupts are required at
10:45; 10:46; 10:47; ………… Timer is registered at 10:45:50,
Timerinterval : 60,00ms 1st interrupt came at 10:45:50 2nd interrupt came at
10:46:58 3rd interrupt came at 10:48:03 the interrupt at 10:47 has not come.
Inorder to get interrupt at 10:47: what is to be done?
Regards J N Prasad
Because of the way windows does multitasking, the WM_TIMER message is not
totally accurate. One thing that you might be able to do is set a timer for
every 50 seconds. Every time you get that, reset it for every 1 second. When
you get to the time you need, reset it again back to 50. There are ways to get
better resolution, but if you only need a message every 60 seconds, it's
probably not worth the effort.
Chris
J N,
While I try to help others with problems they have in various CIS forums, there
are times when I can't deveote any time to CIS for several days, there are even
times when I am on holiday.
So posting a new message directly to me, or mailing it to me is not your best
bet. In general you will get an answer faster if you just post to ALL in the
relevant section.
I think you will have a better chance posting this question in the WINSDK forum
as this is really a Windows API question and has little to do with MFC.
-Ronald-