LocalScheduler
Abstract base class for machine-local schedulers, using the local system clock for time-based operations.
Gets the scheduler's notion of current time.
protected LocalScheduler()
Creates a new local scheduler.
Discovers scheduler services by interface type. The base class implementation returns
requested services for each scheduler interface implemented by the derived class. For
more control over service discovery, derived types can override this method.
public virtual IDisposable Schedule<TState>(TState state, Func<IScheduler, TState, IDisposable> action)
Schedules an action to be executed.
public abstract IDisposable Schedule<TState>(TState state, TimeSpan dueTime, Func<IScheduler, TState, IDisposable> action)
Schedules an action to be executed after dueTime.
public virtual IDisposable Schedule<TState>(TState state, DateTimeOffset dueTime, Func<IScheduler, TState, IDisposable> action)
Schedules an action to be executed at dueTime.
Starts a new stopwatch object.