private void OnStopWatchTimerOnElapsed(object sender, ElapsedEventArgs e) { ElapsedTime = e.SignalTime - TimerStart; // update notification every second if ((int)ElapsedTime.TotalSeconds > _lastNotificationSecond) { var timerText = ElapsedTime.ToShortStopwatchForm(); // update notification showing elapsed time ShowNotification("Activity Started", timerText, 0); // send message that time is updated _lastNotificationSecond = (int)ElapsedTime.TotalSeconds; } }