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

System.Reactive.Concurrency.Scheduler

public static class Scheduler
Provides a set of static properties to access commonly used schedulers.
namespace System.Reactive.Concurrency { public static class Scheduler { public static DateTimeOffset Now { get; } public static ImmediateScheduler Immediate { get; } public static CurrentThreadScheduler CurrentThread { get; } public static DefaultScheduler Default { get; } public static IScheduler ThreadPool { get; } public static IScheduler NewThread { get; } public static IScheduler TaskPool { get; } public static SchedulerOperation Yield(this IScheduler scheduler); public static SchedulerOperation Yield(this IScheduler scheduler, CancellationToken cancellationToken); public static SchedulerOperation Sleep(this IScheduler scheduler, TimeSpan dueTime); public static SchedulerOperation Sleep(this IScheduler scheduler, TimeSpan dueTime, CancellationToken cancellationToken); public static SchedulerOperation Sleep(this IScheduler scheduler, DateTimeOffset dueTime); public static SchedulerOperation Sleep(this IScheduler scheduler, DateTimeOffset dueTime, CancellationToken cancellationToken); public static IDisposable ScheduleAsync<[System.Runtime.CompilerServices.Nullable(2)] TState>(this IScheduler scheduler, TState state, Func<IScheduler, TState, CancellationToken, Task> action); public static IDisposable ScheduleAsync<[System.Runtime.CompilerServices.Nullable(2)] TState>(this IScheduler scheduler, TState state, Func<IScheduler, TState, CancellationToken, Task<IDisposable>> action); public static IDisposable ScheduleAsync(this IScheduler scheduler, Func<IScheduler, CancellationToken, Task> action); public static IDisposable ScheduleAsync(this IScheduler scheduler, Func<IScheduler, CancellationToken, Task<IDisposable>> action); public static IDisposable ScheduleAsync<[System.Runtime.CompilerServices.Nullable(2)] TState>(this IScheduler scheduler, TState state, TimeSpan dueTime, Func<IScheduler, TState, CancellationToken, Task> action); public static IDisposable ScheduleAsync<[System.Runtime.CompilerServices.Nullable(2)] TState>(this IScheduler scheduler, TState state, TimeSpan dueTime, Func<IScheduler, TState, CancellationToken, Task<IDisposable>> action); public static IDisposable ScheduleAsync(this IScheduler scheduler, TimeSpan dueTime, Func<IScheduler, CancellationToken, Task> action); public static IDisposable ScheduleAsync(this IScheduler scheduler, TimeSpan dueTime, Func<IScheduler, CancellationToken, Task<IDisposable>> action); public static IDisposable ScheduleAsync<[System.Runtime.CompilerServices.Nullable(2)] TState>(this IScheduler scheduler, TState state, DateTimeOffset dueTime, Func<IScheduler, TState, CancellationToken, Task> action); public static IDisposable ScheduleAsync<[System.Runtime.CompilerServices.Nullable(2)] TState>(this IScheduler scheduler, TState state, DateTimeOffset dueTime, Func<IScheduler, TState, CancellationToken, Task<IDisposable>> action); public static IDisposable ScheduleAsync(this IScheduler scheduler, DateTimeOffset dueTime, Func<IScheduler, CancellationToken, Task> action); public static IDisposable ScheduleAsync(this IScheduler scheduler, DateTimeOffset dueTime, Func<IScheduler, CancellationToken, Task<IDisposable>> action); public static TimeSpan Normalize(TimeSpan timeSpan); public static IDisposable Schedule(this IScheduler scheduler, Action<Action> action); public static IDisposable Schedule<[System.Runtime.CompilerServices.Nullable(2)] TState>(this IScheduler scheduler, TState state, Action<TState, Action<TState>> action); public static IDisposable Schedule(this IScheduler scheduler, TimeSpan dueTime, Action<Action<TimeSpan>> action); public static IDisposable Schedule<[System.Runtime.CompilerServices.Nullable(2)] TState>(this IScheduler scheduler, TState state, TimeSpan dueTime, Action<TState, Action<TState, TimeSpan>> action); public static IDisposable Schedule(this IScheduler scheduler, DateTimeOffset dueTime, Action<Action<DateTimeOffset>> action); public static IDisposable Schedule<[System.Runtime.CompilerServices.Nullable(2)] TState>(this IScheduler scheduler, TState state, DateTimeOffset dueTime, Action<TState, Action<TState, DateTimeOffset>> action); public static ISchedulerLongRunning AsLongRunning(this IScheduler scheduler); public static IStopwatchProvider AsStopwatchProvider(this IScheduler scheduler); public static ISchedulerPeriodic AsPeriodic(this IScheduler scheduler); public static IDisposable SchedulePeriodic<[System.Runtime.CompilerServices.Nullable(2)] TState>(this IScheduler scheduler, TState state, TimeSpan period, Func<TState, TState> action); public static IDisposable SchedulePeriodic<[System.Runtime.CompilerServices.Nullable(2)] TState>(this IScheduler scheduler, TState state, TimeSpan period, Action<TState> action); public static IDisposable SchedulePeriodic(this IScheduler scheduler, TimeSpan period, Action action); public static IStopwatch StartStopwatch(this IScheduler scheduler); public static IDisposable Schedule(this IScheduler scheduler, Action action); public static IDisposable Schedule(this IScheduler scheduler, TimeSpan dueTime, Action action); public static IDisposable Schedule(this IScheduler scheduler, DateTimeOffset dueTime, Action action); public static IDisposable ScheduleLongRunning(this ISchedulerLongRunning scheduler, Action<ICancelable> action); public static IScheduler DisableOptimizations(this IScheduler scheduler); public static IScheduler DisableOptimizations(this IScheduler scheduler, params Type[] optimizationInterfaces); public static IScheduler Catch<[System.Runtime.CompilerServices.Nullable(0)] TException>(this IScheduler scheduler, Func<TException, bool> handler) where TException : Exception; } }