private void TimerElapsed() { FormattedTime = timerUtil.GetFormattedLocationTime(DateTime.UtcNow); intervalTimer.Interval = timerUtil.GetMinuteUpdateInterval(DateTime.Now); intervalTimer.Start(); }
public Timer(ITimerUtility timerUtil) { this.timerUtil = timerUtil; FormattedTime = timerUtil.GetFormattedLocationTime(DateTime.UtcNow); intervalTimer = new DispatcherTimer( timerUtil.GetMinuteUpdateInterval(DateTime.Now), DispatcherPriority.Normal, delegate { TimerElapsed(); }, Dispatcher.CurrentDispatcher); }