DispatchTimeInterval
Represents a time interval that can be used as an offset from a DispatchTime or DispatchWallTime.
enum DispatchTimeIntervalFor example: let inOneSecond = DispatchTime.now() + DispatchTimeInterval.seconds(1)
If the requested time interval is larger then the internal representation permits, the result of adding it to a DispatchTime or DispatchWallTime is DispatchTime.distantFuture and DispatchWallTime.distantFuture respectively. Such time intervals compare as equal:
let t1 = DispatchTimeInterval.seconds(Int.max) let t2 = DispatchTimeInterval.milliseconds(Int.max) let result = t1 == t2 // true