English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have followed the examples on the net - all of which use timers to "fire" the service working routine. So if I set it to fire every 60 seconds but the last firing is running a little long - do I have two timer_elapsed routines running or is it blocked until the previous 60 second fire is complete?

2007-03-20 10:05:36 · 2 answers · asked by Chuck P 1 in Computers & Internet Programming & Design

2 answers

The timer runs similar to a background process in VB.Net. Like you can run two different timers in the program simultaneously. The timer is a precise incremental counter, and is not 100% accurate. To make it more accurate is to reset the timer and start it over.

2007-03-22 02:33:42 · answer #1 · answered by Anonymous · 0 0

Not entirely sure about vb.net. If its an external timer that simply continues and triggers something every period, then yeah, you might. If you need to avoid that, add some sort of check in the routine it triggers to check and see if it (well a copy of it) is already running, and exit or whatever if it is.

Another way could be to put the delay inside the routine and have it run in a loop. Then you can use the timer to periodically check to make sure it is still going.

This is all general advice, I don't know vb.net specifically.

2007-03-20 17:16:13 · answer #2 · answered by romulusnr 5 · 0 0

fedest.com, questions and answers