Пример #1
0
		/// <summary>
		/// Initializes a new instance of the <see cref="Xevle.Core.StopTimer"/> class.
		/// </summary>
		public StopTimer()
		{
			startTime = 0;
			stopTime = 0;
			
			timerState = StopTimerState.Stop;
		}
Пример #2
0
        public void Start()
        {
            if(timerState == StopTimerState.enStart)
            {
                throw new Exception("Timer is already started!");
            }

            startTime = DateTime.Now.Ticks;
            timerState = StopTimerState.enStart;
        }
Пример #3
0
 public void Stop()
 {
     stopTime = DateTime.Now.Ticks;
     timerState = StopTimerState.enStop;
 }