<PackageReference Include="System.Reactive" Version="6.0.1" />

System.Reactive.Concurrency.VirtualTimeSchedulerBase<TAbsolute, TRelative>

public abstract class VirtualTimeSchedulerBase<TAbsolute, TRelative> : IScheduler, IServiceProvider, IStopwatchProvider where TAbsolute : IComparable<TAbsolute>
Base class for virtual time schedulers.
namespace System.Reactive.Concurrency { public abstract class VirtualTimeSchedulerBase<[System.Runtime.CompilerServices.Nullable(0)] TAbsolute, [System.Runtime.CompilerServices.Nullable(2)] TRelative> : IScheduler, IServiceProvider, IStopwatchProvider where TAbsolute : IComparable<TAbsolute> { public bool IsEnabled { get; } protected IComparer<TAbsolute> Comparer { get; } public TAbsolute Clock { get; set; } public DateTimeOffset Now { get; } protected VirtualTimeSchedulerBase(); protected VirtualTimeSchedulerBase(TAbsolute initialClock, IComparer<TAbsolute> comparer); protected abstract TAbsolute Add(TAbsolute absolute, TRelative relative); protected abstract DateTimeOffset ToDateTimeOffset(TAbsolute absolute); protected abstract TRelative ToRelative(TimeSpan timeSpan); public abstract IDisposable ScheduleAbsolute<[System.Runtime.CompilerServices.Nullable(2)] TState>(TState state, TAbsolute dueTime, Func<IScheduler, TState, IDisposable> action); public IDisposable ScheduleRelative<[System.Runtime.CompilerServices.Nullable(2)] TState>(TState state, TRelative dueTime, Func<IScheduler, TState, IDisposable> action); public IDisposable Schedule<[System.Runtime.CompilerServices.Nullable(2)] TState>(TState state, Func<IScheduler, TState, IDisposable> action); public IDisposable Schedule<[System.Runtime.CompilerServices.Nullable(2)] TState>(TState state, TimeSpan dueTime, Func<IScheduler, TState, IDisposable> action); public IDisposable Schedule<[System.Runtime.CompilerServices.Nullable(2)] TState>(TState state, DateTimeOffset dueTime, Func<IScheduler, TState, IDisposable> action); public void Start(); public void Stop(); public void AdvanceTo(TAbsolute time); public void AdvanceBy(TRelative time); public void Sleep(TRelative time); protected abstract IScheduledItem<TAbsolute> GetNext(); protected virtual object GetService(Type serviceType); public IStopwatch StartStopwatch(); } }