ReactiveUI.Primitives.Concurrency.VirtualClock
Deterministic virtual scheduler backed by DateTimeOffset and TimeSpan that also serves as a TimeProvider.
Gets the scheduler's absolute time clock value.
Gets a value indicating whether the scheduler is enabled to run work.
public VirtualClock()
Initializes a new instance of the VirtualClock class at the default clock value.
Initializes a new instance of the VirtualClock class.
Advances the scheduler's clock by the specified relative time, running all work scheduled for that timespan.
Advances the scheduler's clock to the specified time, running all work till that point.
Schedules an action to be executed at the current clock.
public IDisposable Schedule<TState>(TState state, TimeSpan dueTime, Func<ISequencer, TState, IDisposable> action)
Schedules an action to be executed after a relative due time.
public IDisposable Schedule<TState>(TState state, DateTimeOffset dueTime, Func<ISequencer, TState, IDisposable> action)
Schedules an action to be executed at an absolute date-time.
public IDisposable ScheduleAbsolute<TState>(TState state, DateTimeOffset dueTime, Func<ISequencer, TState, IDisposable> action)
Schedules an action to be executed at an absolute due time.
public IDisposable ScheduleRelative<TState>(TState state, TimeSpan dueTime, Func<ISequencer, TState, IDisposable> action)
Schedules an action to be executed after a relative due time.
Advances the scheduler's clock by the specified relative time without running work.
Starts the virtual time scheduler.
Starts a new stopwatch object.
Stops the virtual time scheduler.