public void StopTimedEventor(TimedEventor timedEventor) { TimeSpan timeToRemove = _listOfActiveEventors[timedEventor]; _listOfActiveEventors.Remove(timedEventor); _eventorsByTime.Remove(timeToRemove); }
private void StartTimedEventor(TimedEventor timedEventor, TimeSpan firstActionTime) { while (_eventorsByTime.ContainsKey(firstActionTime)) { firstActionTime = firstActionTime.Add(new TimeSpan(1)); timedEventor.IncrementActionTime(new TimeSpan(1)); } _listOfActiveEventors.Add(timedEventor, firstActionTime); _eventorsByTime.Add(firstActionTime, timedEventor); }
public void StartTimedAtCurrentTime(TimedEventor timedEventor) { StartTimedEventor(timedEventor, this.CurrentProcessingTimeSpan); }