Method Schedule
Schedule(Action, TimeSpan)
Schedules the specified action to be invoked after the given delay.
public ScheduledTask Schedule(Action action, TimeSpan delay)
Parameters
Returns
- ScheduledTask
A disposable object representing the scheduled task. Calling Dispose() will prevent the schedule from running.
Exceptions
- ArgumentOutOfRangeException
Thrown if the delay is less than 0.
- ArgumentNullException
Thrown if no action is specified.