Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: PowerBuilder
Expertise: Beginner
Dec 20, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Losing Timer Events

When I start a timer on a window with an interval of one second, I expect to get a timer event on the window every second. I have noticed that if you have a command button on the window that opens another sheet, certain timer events are lost forever. While the sheet is being opened, the timer event is not received until the processor is busy opening the window. I therefore end up losing three to four timer events (or 3-4 seconds).

Though I lose these timer events I was expecting to get timer events that I had lost in immediate succession as it happens with the system clock. But what happens is different. The timer events, after whatever lost time, start coming again at intervals of 1 second, without adjusting for the number of seconds it had lost.

This gets down to the Windows operating system. If your process (the window with the timer) is not processing the events quickly enough, Windows will not let the queue of events waiting on the timer event build up, so it will start to discard the timer events.

You will have to design/code your application to account for these lost seconds.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date