The .NET BCL contains 3 timers:
-
System.Timers.Timer– This is a timer in the sense of a stopwatch, meaning it tells you how long each operation took. It has methods for pausing and resuming. However, it can also work like a standardSystem.Windows.Forms.Timer; you just need to set the propertySystem.Timers.Timer.AutoResettotrue. When the interval elapses, the event is raisedElapsed. -
System.Threading.Timer– What sets it apart from the others is the ability to change the period while it is running. You learn that the interval has elapsed through the delegateTimerCallback, which has to be specified in the constructor. -
System.Windows.Forms.Timer– A classic timer that raises an event after the specified interval elapses. It also lets you pause the thread by setting the propertySystem.Windows.Forms.Timer.Enabledtofalse, or assign your own object to the timer through the propertyTag.
So it is up to you to decide which Timer best suits your needs. And if you still cannot choose, cut your own diamond or search the internet.