protected abstract void _Schedule([NotNull] RecurringEvent whatAndWhen);
protected override void _Schedule(RecurringEvent whatAndWhen) { whatAndWhen.Cancelable = new Timer(_ => whatAndWhen.Action(), null, TimeSpan.Zero, whatAndWhen.Frequency); }
protected override void _Schedule(RecurringEvent whatAndWhen) { _triggers.Add(whatAndWhen); whatAndWhen.Cancelable = new StackJanitor(() => _triggers.Remove(whatAndWhen)); }
public Task StartAutoplay() { _slideAdvancer = _clock.Schedule(TimeSpan.FromSeconds(_machine.SlideAdvanceSpeed), AdvanceSlide); return(AdvanceSlide()); }