StartTimer() public method

public StartTimer ( ) : void
return void
Example #1
0
 private void SessionSwitchEvent(object o, LockStatusChangedEventArgs e)
 {
     if (e.Reason == LockStatusChangedReason.Lock)
     {
         _timeController.StopTimer();
     }
     else if (e.Reason == LockStatusChangedReason.Unlock)
     {
         _timeController.StartTimer();
     }
 }
        public void StartTimerWorks()
        {
            var remainingTimeController = new RemainingTimeController(TimeSpan.FromMinutes(30));

            remainingTimeController.StopTimer();
            remainingTimeController.StartTimer();
            var firstRemainingTime = remainingTimeController.RemainingTimeToLock;
            Thread.Sleep(3000);
            var secondRemainingTime = remainingTimeController.RemainingTimeToLock;

            Assert.AreNotEqual(firstRemainingTime, secondRemainingTime);
        }