Share via


VirtualTimeScheduler<TAbsolute, TRelative> Class

Represents the base class for virtual time schedulers using a priority queue for scheduled items.

Inheritance Hierarchy

System.Object
  System.Reactive.Concurrency.VirtualTimeSchedulerBase<TAbsolute, TRelative>
    System.Reactive.Concurrency.VirtualTimeScheduler<TAbsolute, TRelative>
      Microsoft.Reactive.Testing.TestScheduler

Namespace:  System.Reactive.Concurrency
Assembly:  System.Reactive (in System.Reactive.dll)

Syntax

'Declaration
Public MustInherit Class VirtualTimeScheduler(Of TAbsolute, TRelative) _
    Inherits VirtualTimeSchedulerBase(Of TAbsolute, TRelative)
'Usage
Dim instance As VirtualTimeScheduler(Of TAbsolute, TRelative)
public abstract class VirtualTimeScheduler<TAbsolute, TRelative> : VirtualTimeSchedulerBase<TAbsolute, TRelative>
generic<typename TAbsolute, typename TRelative>
public ref class VirtualTimeScheduler abstract : public VirtualTimeSchedulerBase<TAbsolute, TRelative>
[<AbstractClassAttribute>]
type VirtualTimeScheduler<'TAbsolute, 'TRelative> =  
    class
        inherit VirtualTimeSchedulerBase<'TAbsolute, 'TRelative>
    end
JScript does not support generic types and methods.

Type Parameters

  • TAbsolute
    The absolute time argument type.
  • TRelative
    The relative time argument type.

The VirtualTimeScheduler<TAbsolute, TRelative> type exposes the following members.

Constructors

  Name Description
Protected method VirtualTimeScheduler<TAbsolute, TRelative>() Creates a new virtual time scheduler with the default value of TAbsolute for the initial clock value.
Protected method VirtualTimeScheduler<TAbsolute, TRelative>(TAbsolute, IComparer<TAbsolute>) Creates a new virtual time scheduler.

Top

Properties

  Name Description
Public property Clock Gets the scheduler's absolute time clock value. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Protected property Comparer Gets the comparer used to compare absolute time values. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Public property IsEnabled Gets whether the scheduler is enabled to run work. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Public property Now Gets the scheduler's notion of current time. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)

Top

Methods

  Name Description
Protected method Add Adds a relative time to an absolute time value. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Public method AdvanceBy Advances the scheduler's clock by the specified relative time, running all work scheduled for that timespan. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Public method AdvanceTo Advances the scheduler's clock to the specified time, running all work till that point. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode (Inherited from Object.)
Protected method GetNext Gets the next scheduled item to be executed. (Overrides VirtualTimeSchedulerBase<TAbsolute, TRelative>.GetNext().)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Schedule<TState>(TState, Func<IScheduler, TState, IDisposable>) Schedules an action to be executed. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Public method Schedule<TState>(TState, DateTimeOffset, Func<IScheduler, TState, IDisposable>) Schedules an action to be executed at dueTime. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Public method Schedule<TState>(TState, TimeSpan, Func<IScheduler, TState, IDisposable>) Schedules an action to be executed after dueTime. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Public method ScheduleAbsolute<TState>(TState, TAbsolute, Func<IScheduler, TState, IDisposable>) Schedules an action to be executed at dueTime. (Overrides VirtualTimeSchedulerBase<TAbsolute, TRelative>.ScheduleAbsolute<TState>(TState, TAbsolute, Func<IScheduler, TState, IDisposable>).)
Public method ScheduleAbsolute<TState>(TState, TAbsolute, Func<IScheduler, TState, IDisposable>) Schedules an action to be executed at dueTime. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Public method ScheduleRelative<TState> Schedules an action to be executed at dueTime. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Public method Start Starts the virtual time scheduler. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Public method Stop Stops the virtual time scheduler. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Protected method ToDateTimeOffset Converts the absolute time value to a DateTimeOffset value. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Protected method ToRelative Converts the TimeSpan value to a relative time value. (Inherited from VirtualTimeSchedulerBase<TAbsolute, TRelative>.)
Public method ToString (Inherited from Object.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Reactive.Concurrency Namespace