ReactiveUI.Primitives.Concurrency.VirtualTimeSequencer<TAbsolute, TRelative>
public sealed class VirtualTimeSequencer<TAbsolute, TRelative> : ISequencer, IServiceProvider, IStopwatchProvider where TAbsolute : IComparable<TAbsolute>
Virtual time scheduler that runs scheduled work against a controllable clock. Per-clock arithmetic is supplied
as delegates at construction, so a single sealed type serves every TAbsolute/
TRelative pairing without an inheritance hierarchy.
namespace ReactiveUI.Primitives.Concurrency
{
public sealed class VirtualTimeSequencer<[System.Runtime.CompilerServices.Nullable(0)] TAbsolute, [System.Runtime.CompilerServices.Nullable(2)] TRelative> : ISequencer, IServiceProvider where TAbsolute : IComparable<TAbsolute>
{
public TAbsolute Clock { get; }
public bool IsEnabled { get; }
public DateTimeOffset Now { get; }
public long Timestamp { get; }
public VirtualTimeSequencer(TAbsolute initialClock, IComparer<TAbsolute> comparer, Func<TAbsolute, TRelative, TAbsolute> add, Func<TAbsolute, DateTimeOffset> toDateTimeOffset, Func<TimeSpan, TRelative> toRelative);
public void AdvanceBy(TRelative time);
public void AdvanceTo(TAbsolute time);
public void Sleep(TRelative time);
public void Start();
public void Stop();
public void Schedule(IWorkItem item);
public void Schedule(IWorkItem item, long dueTimestamp);
public IDisposable Schedule<[System.Runtime.CompilerServices.Nullable(2)] TState>(TState state, Func<ISequencer, TState, IDisposable> action);
public IDisposable Schedule<[System.Runtime.CompilerServices.Nullable(2)] TState>(TState state, TimeSpan dueTime, Func<ISequencer, TState, IDisposable> action);
public IDisposable Schedule<[System.Runtime.CompilerServices.Nullable(2)] TState>(TState state, DateTimeOffset dueTime, Func<ISequencer, TState, IDisposable> action);
public IDisposable ScheduleAbsolute<[System.Runtime.CompilerServices.Nullable(2)] TState>(TState state, TAbsolute dueTime, Func<ISequencer, TState, IDisposable> action);
public IDisposable ScheduleRelative<[System.Runtime.CompilerServices.Nullable(2)] TState>(TState state, TRelative dueTime, Func<ISequencer, TState, IDisposable> action);
public IStopwatch StartStopwatch();
}
}