Beispiel #1
0
        public void StopTracking(DateTime stopTimeUtc)
        {
            if (_activeSegment == null)
            {
                return;
            }

            _activeSegment.EndTimeUtc = stopTimeUtc;
            _activeSegment = null; // todo: review this code

            IsActive = false;
        }
Beispiel #2
0
        public void StartTracking(DateTime startTimeUtc)
        {
            if (_activeSegment != null)
            {
                StopTracking(DateTime.UtcNow);
            }

            _activeSegment = new Segment(startTimeUtc);
            _segments.Add(_activeSegment);

            IsActive = true;
        }