   /// - parameter reason: the reason for the cancelation if the operation times out. Defaults to "Operation timed out".
   /// - returns: a `Deferred` reference
 
-  public final func timeout(ns: Int, reason: String = DefaultTimeoutMessage) -> Deferred
-  {
-    return timeout64(ns: Int64(max(ns,0)), reason: reason)
-  }
-
-  private func timeout64(ns: Int64, reason: String) -> Deferred
+  public final func timeout(_ delay: DispatchTimeInterval, reason: String = DefaultTimeoutMessage) -> Deferred
   {
     if self.isDetermined { return self }
-    if ns > 0
-    {
-      return Timeout(source: self, deadline: DispatchTime(DispatchTime.now().rawValue + UInt64(max(ns,0))), reason: reason)
+    if delay.isPositive
+    {
+      return Timeout(source: self, deadline: .now() + delay, reason: reason)
     }
     return Mapped(source: self, result: Result.error(DeferredError.canceled(reason)))
   }


extension Deferred
{
  /// Return a `Deferred` whose determination will occur at most `µs` microseconds from the time of evaluation.
  /// If `self` has not become determined after the timeout delay, the new `Deferred` will be canceled.
  /// - parameter µs: a number of microseconds
  /// - parameter reason: the reason for the cancelation if the operation times out. Defaults to "Operation timed out".
  /// - returns: a `Deferred` reference

  public final func timeout(µs: Int, reason: String = DefaultTimeoutMessage) -> Deferred
  {
    return timeout64(ns: Int64(max(µs,0))*1000, reason: reason)
  }

  /// Return a `Deferred` whose determination will occur at most `ms` milliseconds from the time of evaluation.
  /// If `self` has not become determined after the timeout delay, the new `Deferred` will be canceled.
  /// - parameter ms: a number of milliseconds
  /// - parameter reason: the reason for the cancelation if the operation times out. Defaults to "Operation timed out".
  /// - returns: a `Deferred` reference

  public final func timeout(ms: Int, reason: String = DefaultTimeoutMessage) -> Deferred
  {
    return timeout64(ns: Int64(max(ms,0))*1_000_000, reason: reason)
  }

  /// Return a `Deferred` whose determination will occur at most a number of seconds from the time of evaluation.
  /// If `self` has not become determined after the timeout delay, the new `Deferred` will be canceled.
  /// - parameter seconds: a number of seconds as a `Double` or `NSTimeInterval`


  public final func timeout(seconds s: Double, reason: String = DefaultTimeoutMessage) -> Deferred
  {
    if self.isDetermined { return self }
    if s > 0
    {
      return Timeout(source: self, deadline: .now() + s, reason: reason)
    }
    return Mapped(source: self, result: Result.error(DeferredError.canceled(reason)))
  }

  /// Return a `Deferred` whose determination will occur at most `ns` nanoseconds from the time of evaluation.
