I am not aware of any control that does what you ask for. Here are the timers I'm familiar with:
- System.Threading.Timer (interval) - generate repeating events (purely digital time without user interface updates)
- System.Windows.Threading.DispatcherTimer (..) - Use in a streaming context (WPF / Silverlight)
- System.Windows.Forms.Timer () - use the Windows forms message loop (WinForms in the main user interface thread)
I find it best to use DispatcherTimer at intervals of, say, 30 seconds, and then match the actual time with the expected time and date. From what I remember, such timers are designed for small intervals, so large intervals will be less accurate. (I'm talking about a fix)
EDIT : MSDN timing notes : "Timers do not guarantee execution exactly when a time interval occurs, but they are not guaranteed to be executed before a time interval occurs. This is because DispatcherTimer operations are placed on Dispatcher like other operations. When the DispatcherTimer operation is performed, depending on the other jobs in the queue and their priorities. "
Peet brits
source share