Interface ISchedulerPeriodic
Scheduler with support for running periodic tasks. This type of scheduler can be used to run timers more efficiently instead of using recursive scheduling.
Namespace: System.Reactive.Concurrency
Assembly: System.Reactive.Interfaces.dll
Syntax
public interface ISchedulerPeriodic
Methods
| Improve this Doc View SourceSchedulePeriodic<TState>(TState, TimeSpan, Func<TState, TState>)
Schedules a periodic piece of work.
Declaration
IDisposable SchedulePeriodic<TState>(TState state, TimeSpan period, Func<TState, TState> action)
Parameters
Type | Name | Description |
---|---|---|
TState | state | Initial state passed to the action upon the first iteration. |
TimeSpan | period | Period for running the work periodically. |
Func<TState, TState> | action | Action to be executed, potentially updating the state. |
Returns
Type | Description |
---|---|
IDisposable | The disposable object used to cancel the scheduled recurring action (best effort). |
Type Parameters
Name | Description |
---|---|
TState | The type of the state passed to the scheduled action. |