VirtualTimeScheduler
open class VirtualTimeScheduler<Converter: VirtualTimeConverterType>
    : SchedulerType
                Base class for virtual time schedulers using a priority queue for scheduled items.
- 
                  
                  
Undocumented
Declaration
Swift
public typealias VirtualTime = Converter.VirtualTimeUnit - 
                  
                  
Undocumented
Declaration
Swift
public typealias VirtualTimeInterval = Converter.VirtualTimeIntervalUnit - 
                  
                  
Declaration
Swift
public var now: RxTime { get }Return Value
Current time.
 - 
                  
                  
Declaration
Swift
public var clock: VirtualTime { get }Return Value
Scheduler’s absolute time clock value.
 - 
                  
                  
Creates a new virtual time scheduler.
Declaration
Swift
public init(initialClock: VirtualTime, converter: Converter)Parameters
initialClockInitial value for the clock.
 - 
                  
                  
Schedules an action to be executed immediately.
Declaration
Swift
public func schedule<StateType>(_ state: StateType, action: @escaping (StateType) -> Disposable) -> DisposableParameters
stateState passed to the action to be executed.
actionAction to be executed.
Return Value
The disposable object used to cancel the scheduled action (best effort).
 - 
                  
                  
Schedules an action to be executed.
Declaration
Swift
public func scheduleRelative<StateType>(_ state: StateType, dueTime: RxTimeInterval, action: @escaping (StateType) -> Disposable) -> DisposableParameters
stateState passed to the action to be executed.
dueTimeRelative time after which to execute the action.
actionAction to be executed.
Return Value
The disposable object used to cancel the scheduled action (best effort).
 - 
                  
                  
Schedules an action to be executed after relative time has passed.
Declaration
Swift
public func scheduleRelativeVirtual<StateType>(_ state: StateType, dueTime: VirtualTimeInterval, action: @escaping (StateType) -> Disposable) -> DisposableParameters
stateState passed to the action to be executed.
timeAbsolute time when to execute the action. If this is less or equal then
now,now + 1will be used.actionAction to be executed.
Return Value
The disposable object used to cancel the scheduled action (best effort).
 - 
                  
                  
Schedules an action to be executed at absolute virtual time.
Declaration
Swift
public func scheduleAbsoluteVirtual<StateType>(_ state: StateType, time: Converter.VirtualTimeUnit, action: @escaping (StateType) -> Disposable) -> DisposableParameters
stateState passed to the action to be executed.
timeAbsolute time when to execute the action.
actionAction to be executed.
Return Value
The disposable object used to cancel the scheduled action (best effort).
 - 
                  
                  
Adjusts time of scheduling before adding item to schedule queue.
Declaration
Swift
open func adjustScheduledTime(_ time: Converter.VirtualTimeUnit) -> Converter.VirtualTimeUnit - 
                  
                  
Starts the virtual time scheduler.
Declaration
Swift
public func start() - 
                  
                  
Advances the scheduler’s clock to the specified time, running all work till that point.
Declaration
Swift
public func advanceTo(_ virtualTime: VirtualTime)Parameters
virtualTimeAbsolute time to advance the scheduler’s clock to.
 - 
                  
                  
Advances the scheduler’s clock by the specified relative time.
Declaration
Swift
public func sleep(_ virtualInterval: VirtualTimeInterval) - 
                  
                  
Stops the virtual time scheduler.
Declaration
Swift
public func stop() 
- 
                  
                  
A textual representation of
self, suitable for debugging.Declaration
Swift
public var debugDescription: String { get } 
        VirtualTimeScheduler Class Reference