Timer question

  • Thread starter Thread starter VB Programmer
  • Start date Start date
V

VB Programmer

If a timer is running (System.Timers.Timer class) and it's set to a 1 second
interval and the code take 5 seconds to process will the code finish before
it runs again? The reason I ask is that when I'm stepping through the main
code for the timer it seems to erratically jump around.
 
If a timer is running (System.Timers.Timer class) and it's set to a 1 second
interval and the code take 5 seconds to process will the code finish before
it runs again? The reason I ask is that when I'm stepping through the main
code for the timer it seems to erratically jump around.

I think in a case like that, you should always disable the timer as the
first line of code in the timers elapsed event. Then at the end, re-enable
the timer.
 
Back
Top