VirtualTimeSequencer class¶
Attributes: [DebuggerDisplay("{DebuggerDisplay,nq}")]
Defined in
Namespace: ReactiveUI.Primitives.Concurrency
Assembly: ReactiveUI.Primitives.dll
Full name: ReactiveUI.Primitives.Concurrency.VirtualTimeSequencer<T1, T2>
Modifiers: public sealed
Summary¶
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.
Applies to
net10.0, net10.0-android36.0, net10.0-ios26.0, net10.0-macos26.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-desktop1.0, net9.0-browserwasm1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net481, net471, net462
Class hierarchy
classDiagram
class VirtualTimeSequencer~T1,T2~
class ISequencer {
<>
}
ISequencer <|.. VirtualTimeSequencer~T1,T2~
class IServiceProvider {
<>
}
IServiceProvider <|.. VirtualTimeSequencer~T1,T2~
class IStopwatchProvider {
<>
}
IStopwatchProvider <|.. VirtualTimeSequencer~T1,T2~
Implements: ISequencer, IServiceProvider, IStopwatchProvider
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [VirtualTimeSequencer](# class. |
Properties¶
| Name | Summary |
|---|---|
| Clock | Gets the scheduler's absolute time clock value. |
| IsEnabled | Gets a value indicating whether the scheduler is enabled to run work. |
| Now | Gets the scheduler's notion of current time. |
| Timestamp | Gets the sequencer's monotonic timestamp. |
Methods¶
| Name | Summary |
|---|---|
| AdvanceBy | Advances the scheduler's clock by the specified relative time, running all work scheduled for that timespan. |
| AdvanceTo | Advances the scheduler's clock to the specified time, running all work till that point. |
| Sleep | Advances the scheduler's clock by the specified relative time without running work. |
| Start | Starts the virtual time scheduler. |
| Stop | Stops the virtual time scheduler. |
| Schedule | Schedules a work item for execution as soon as possible. |
| ScheduleAbsolute | Schedules an action to be executed at an absolute due time. |
| ScheduleRelative | Schedules an action to be executed after a relative due time. |
| StartStopwatch | Starts a new stopwatch object. |