Interface IScheduler
- Namespace
- RxSharp
- Assembly
- RxSharp.dll
Schedules work after a delay. Mirrors rxjs's SchedulerLike. A minimal seam for now — see CLAUDE.md for the plan to grow this into a full scheduler hierarchy with a virtual-time implementation.
public interface IScheduler
Properties
Now
Gets the scheduler's current notion of "now". Used by time-based operators instead of reading the system clock directly, so a future virtual-time scheduler can control it.
DateTimeOffset Now { get; }
Property Value
- DateTimeOffset
Methods
Schedule(Action, TimeSpan)
Schedules action to run after dueTime elapses.
IDisposable Schedule(Action action, TimeSpan dueTime)
Parameters
actionActionThe work to run.
dueTimeTimeSpanHow long to wait before running
action. A negative value is treated as zero.
Returns
- IDisposable
A disposable that cancels the scheduled work if disposed before it runs.