 
   public func timeout(seconds s: Double, reason: String = DefaultTimeoutMessage) -> Deferred
   {
-    return timeout(ns: Int(s*1e9), reason: reason)
+    return timeout64(ns: Int64(s*1e9), reason: reason)
   }
 
   /// Return a `Deferred` whose determination will occur at most `ns` nanoseconds from the time of evaluation.


  public func delay(ms ms: Int) -> Deferred
  {
    return delay(ns: ms*1_000_000)
  }

  /// Return a `Deferred` whose determination will occur at least a number of seconds from the time of evaluation.

  /// - returns: a `Deferred` reference

  public func timeout(ns ns: Int, reason: String = DefaultTimeoutMessage) -> Deferred
  {
    return timeout64(ns: Int64(ns), reason: reason)
  }

  private func timeout64(ns ns: Int64, reason: String = DefaultTimeoutMessage) -> Deferred
  {
    if self.isDetermined { return self }

    if ns > 0
    {
      let queue = dispatch_get_global_queue(qos_class_self(), 0)
      let timeout = dispatch_time(DISPATCH_TIME_NOW, ns)

      let perishable = map(queue) { $0 }
      dispatch_after(timeout, queue) { perishable.cancel(reason) }
