 }
 
 public func +(time: DispatchTime, seconds: Double) -> DispatchTime {
-	let interval = seconds * Double(NSEC_PER_SEC)
-	let t = CDispatch.dispatch_time(time.rawValue,
-		interval.isInfinite || interval.isNaN ? Int64.max : Int64(interval))
+	let t = CDispatch.dispatch_time(time.rawValue, toInt64Clamped(seconds * Double(NSEC_PER_SEC)));
 	return DispatchTime(rawValue: t)
 }
 
 public func -(time: DispatchTime, seconds: Double) -> DispatchTime {
-	let interval = -seconds * Double(NSEC_PER_SEC)
-	let t = CDispatch.dispatch_time(time.rawValue,
-		interval.isInfinite || interval.isNaN ? Int64.min : Int64(interval))
+	let t = CDispatch.dispatch_time(time.rawValue, toInt64Clamped(-seconds * Double(NSEC_PER_SEC)));
 	return DispatchTime(rawValue: t)
 }
 

}

public func +(time: DispatchWallTime, seconds: Double) -> DispatchWallTime {
	let interval = seconds * Double(NSEC_PER_SEC)
	let t = CDispatch.dispatch_time(time.rawValue,
		interval.isInfinite || interval.isNaN ? Int64.max : Int64(interval))
	return DispatchWallTime(rawValue: t)
}

public func -(time: DispatchWallTime, seconds: Double) -> DispatchWallTime {
	let interval = -seconds * Double(NSEC_PER_SEC)
	let t = CDispatch.dispatch_time(time.rawValue,
		interval.isInfinite || interval.isNaN ? Int64.min : Int64(interval))
	return DispatchWallTime(rawValue: t)
}


	internal var rawValue: Int64 {
		switch self {
		case .seconds(let s): return clampedInt64Product(Int64(s), Int64(NSEC_PER_SEC))
		case .milliseconds(let ms): return clampedInt64Product(Int64(ms), Int64(NSEC_PER_MSEC))
		case .microseconds(let us): return clampedInt64Product(Int64(us), Int64(NSEC_PER_USEC))
		case .nanoseconds(let ns): return Int64(ns)
		case .never: return Int64.max
		}
