HistoricalSchedulerTimeConverter
public struct HistoricalSchedulerTimeConverter : VirtualTimeConverterType
Converts historical virtual time into real time.
Since historical virtual time is also measured in Date
, this converter is identity function.
-
Virtual time unit used that represents ticks of virtual clock.
Declaration
Swift
public typealias VirtualTimeUnit = RxTime
-
Virtual time unit used to represent differences of virtual times.
Declaration
Swift
public typealias VirtualTimeIntervalUnit = TimeInterval
-
Returns identical value of argument passed because historical virtual time is equal to real time, just decoupled from local machine clock.
Declaration
Swift
public func convertFromVirtualTime(_ virtualTime: VirtualTimeUnit) -> RxTime
-
Returns identical value of argument passed because historical virtual time is equal to real time, just decoupled from local machine clock.
Declaration
Swift
public func convertToVirtualTime(_ time: RxTime) -> VirtualTimeUnit
-
Returns identical value of argument passed because historical virtual time is equal to real time, just decoupled from local machine clock.
Declaration
Swift
public func convertFromVirtualTimeInterval(_ virtualTimeInterval: VirtualTimeIntervalUnit) -> TimeInterval
-
Returns identical value of argument passed because historical virtual time is equal to real time, just decoupled from local machine clock.
Declaration
Swift
public func convertToVirtualTimeInterval(_ timeInterval: TimeInterval) -> VirtualTimeIntervalUnit
-
Offsets
Date
by time interval.Declaration
Swift
public func offsetVirtualTime(_ time: VirtualTimeUnit, offset: VirtualTimeIntervalUnit) -> VirtualTimeUnit
Parameters
time
Time.
timeInterval
Time interval offset.
Return Value
Time offsetted by time interval.
-
Compares two
Date
s.Declaration
Swift
public func compareVirtualTime(_ lhs: VirtualTimeUnit, _ rhs: VirtualTimeUnit) -> VirtualTimeComparison