/// <summary> /// Initializes a new instance of the <see cref="Xevle.Core.StopTimer"/> class. /// </summary> public StopTimer() { startTime = 0; stopTime = 0; timerState = StopTimerState.Stop; }
public void Start() { if(timerState == StopTimerState.enStart) { throw new Exception("Timer is already started!"); } startTime = DateTime.Now.Ticks; timerState = StopTimerState.enStart; }
public void Stop() { stopTime = DateTime.Now.Ticks; timerState = StopTimerState.enStop; }