Browse Source

Change "timeout" types from Double to TimeInterval (jconverse@)

Tim Burks 9 years ago
parent
commit
bd4826cc6f

+ 1 - 1
Packages/gRPC/Sources/Client.swift

@@ -82,7 +82,7 @@ public class Client {
   /// - Parameter method: the gRPC method name for the call
   /// - Parameter timeout: a timeout value in seconds
   /// - Returns: a Call object that can be used to perform the request
-  public func makeCall(host:String, method:String, timeout:Double) -> Call {
+  public func makeCall(host:String, method:String, timeout:TimeInterval) -> Call {
     let call = cgrpc_client_create_call(underlyingClient, method, host, timeout)!
     return Call(call:call, owned:true, completionQueue:self.completionQueue)
   }

+ 1 - 1
Packages/gRPC/Sources/CompletionQueue.swift

@@ -91,7 +91,7 @@ internal class CompletionQueue {
   ///
   /// - Parameter timeout: a timeout value in seconds
   /// - Returns: a grpc_completion_type code indicating the result of waiting
-  internal func wait(timeout: Double) -> CompletionQueueEvent {
+  internal func wait(timeout: TimeInterval) -> CompletionQueueEvent {
     let event = cgrpc_completion_queue_get_next_event(underlyingCompletionQueue, timeout);
     return CompletionQueueEvent(event)
   }

+ 1 - 1
Packages/gRPC/Sources/Server.swift

@@ -122,7 +122,7 @@ public class Server {
   /// Gets the next request sent to the server
   ///
   /// - Returns: a tuple containing the results of waiting and a possible Handler for the request
-  private func getNextRequest(timeout: Double) -> (CallError, CompletionType, Handler?) {
+  private func getNextRequest(timeout: TimeInterval) -> (CallError, CompletionType, Handler?) {
     let handler = Handler(underlyingHandler:cgrpc_handler_create_with_server(underlyingServer))
     let call_error = handler.requestCall(tag:101)
     if (call_error != .ok) {