@@ -89,23 +89,23 @@ public enum DispatchTimeInterval {
89
89
case microseconds( Int )
90
90
case nanoseconds( Int )
91
91
92
- internal var rawValue : UInt64 {
92
+ internal var rawValue : Int64 {
93
93
switch self {
94
- case . seconds( let s) : return UInt64 ( s) * NSEC_PER_SEC
95
- case . milliseconds( let ms) : return UInt64 ( ms) * NSEC_PER_MSEC
96
- case . microseconds( let us) : return UInt64 ( us) * NSEC_PER_USEC
97
- case . nanoseconds( let ns) : return UInt64 ( ns)
94
+ case . seconds( let s) : return Int64 ( s) * Int64 ( NSEC_PER_SEC)
95
+ case . milliseconds( let ms) : return Int64 ( ms) * Int64 ( NSEC_PER_MSEC)
96
+ case . microseconds( let us) : return Int64 ( us) * Int64 ( NSEC_PER_USEC)
97
+ case . nanoseconds( let ns) : return Int64 ( ns)
98
98
}
99
99
}
100
100
}
101
101
102
102
public func + ( time: DispatchTime , interval: DispatchTimeInterval ) -> DispatchTime {
103
- let t = CDispatch . dispatch_time ( time. rawValue, Int64 ( interval. rawValue) )
103
+ let t = CDispatch . dispatch_time ( time. rawValue, interval. rawValue)
104
104
return DispatchTime ( rawValue: t)
105
105
}
106
106
107
107
public func - ( time: DispatchTime , interval: DispatchTimeInterval ) -> DispatchTime {
108
- let t = CDispatch . dispatch_time ( time. rawValue, - Int64 ( interval. rawValue) )
108
+ let t = CDispatch . dispatch_time ( time. rawValue, - interval. rawValue)
109
109
return DispatchTime ( rawValue: t)
110
110
}
111
111
@@ -120,12 +120,12 @@ public func -(time: DispatchTime, seconds: Double) -> DispatchTime {
120
120
}
121
121
122
122
public func + ( time: DispatchWallTime , interval: DispatchTimeInterval ) -> DispatchWallTime {
123
- let t = CDispatch . dispatch_time ( time. rawValue, Int64 ( interval. rawValue) )
123
+ let t = CDispatch . dispatch_time ( time. rawValue, interval. rawValue)
124
124
return DispatchWallTime ( rawValue: t)
125
125
}
126
126
127
127
public func - ( time: DispatchWallTime , interval: DispatchTimeInterval ) -> DispatchWallTime {
128
- let t = CDispatch . dispatch_time ( time. rawValue, - Int64 ( interval. rawValue) )
128
+ let t = CDispatch . dispatch_time ( time. rawValue, - interval. rawValue)
129
129
return DispatchWallTime ( rawValue: t)
130
130
}
131
131
0 commit comments