I'd like to know is there any other option to show current time without using DispatcherTimer? Unfortunately app need's to run in slow PC's and DispatcherTimer continuously increasing memory usage. I check that in WPF Performance Profiling Tool and that's true - CPU usage with 1sec timespan is ~5-15%. And becouse im using class to get time value and show that on label, it would be great if method to show could run without xaml-generated controls.
Thanks!
@EDIT:
DispatcherTimer dispatcherTimer = new DispatcherTimer();
dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
dispatcherTimer.Interval = new TimeSpan(0, 0, 0);
dispatcherTimer.Start();
and when tick:
private void dispatcherTimer_Tick(object sender, EventArgs e)
{
lbl.Content = DateTime.Now.ToString("F");
// lbl is static label which i create once and show i several windows.
}