aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/completion_queue.h
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nnoble@google.com>2015-04-07 18:01:18 -0700
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-04-08 05:42:08 +0200
commit89219162dd613b58da8f3cd418f4825a5d566da5 (patch)
tree3c3a4b0a299e7df62caff4562863bde6377d965a /include/grpc++/completion_queue.h
parent9973aa3aa6e29e5949f9a330cc3c1eb92c0a5830 (diff)
Refactoring std::chrono out.
Diffstat (limited to 'include/grpc++/completion_queue.h')
-rw-r--r--include/grpc++/completion_queue.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/grpc++/completion_queue.h b/include/grpc++/completion_queue.h
index e6a8c6fe55..ba390c96e9 100644
--- a/include/grpc++/completion_queue.h
+++ b/include/grpc++/completion_queue.h
@@ -34,9 +34,9 @@
#ifndef GRPCXX_COMPLETION_QUEUE_H
#define GRPCXX_COMPLETION_QUEUE_H
-#include <chrono>
-#include <grpc++/impl/client_unary_call.h>
#include <grpc/support/time.h>
+#include <grpc++/impl/client_unary_call.h>
+#include <grpc++/time.h>
struct grpc_completion_queue;
@@ -82,10 +82,13 @@ class CompletionQueue {
// Nonblocking (until deadline) read from queue.
// Cannot rely on result of tag or ok if return is TIMEOUT
- NextStatus AsyncNext(void** tag, bool* ok,
- std::chrono::system_clock::time_point deadline);
+ template<typename T>
+ NextStatus AsyncNext(void** tag, bool* ok, const T& deadline) {
+ TimePoint<T> deadline_tp(deadline);
+ return AsyncNextInternal(tag, ok, deadline_tp.raw_time());
+ }
- // Blocking (until deadline) read from queue.
+ // Blocking read from queue.
// Returns false if the queue is ready for destruction, true if event
bool Next(void** tag, bool* ok) {