public Runner(ProjectorBase projector, TimeSpan?runForDuration = null) { Projector = projector; RunForDuration = runForDuration ?? TimeSpan.FromMinutes(1); _startedAt = new InterlockedDateTime(DateTime.MaxValue); _timeoutCalc = new TimeoutCalculator(TimeSpan.Zero); _runnerTimer = CreateTimer(_timeoutCalc); }
public void Add(ProjectorBase projector, TimeSpan?runForDuration = null) { _projectors.Add(new Runner(projector, runForDuration)); }