When I say create a timer object for each scheduled time I mean programmatically in code such as Timer timer = new Timer() and then add them to a collection of timers that is within the same scope of all executing code that requires them, such as Collection<Timer> _timers = new Collection<Timer>() and when you do a new timer you just call _timer.Add(newTimerObject)
Main Topics
Browse All Topics





by: GewgalaPosted on 2009-09-09 at 09:52:17ID: 25293161
What I have done is create a timer object for each scheduled time. Set the interval to the amount of seconds between the current time and the desired tick time that way they only tick when you need them to. Then in the code that executes when they tick, reconfigure the tick intervals for the amount of seconds between current time and desired tick time.