Updating wrapped languages to new time functions
diff --git a/src/cpp/util/time.cc b/src/cpp/util/time.cc
index 99b857a..a814cad 100644
--- a/src/cpp/util/time.cc
+++ b/src/cpp/util/time.cc
@@ -59,6 +59,7 @@
   nanoseconds nsecs = duration_cast<nanoseconds>(deadline - secs);
   to->tv_sec = secs.count();
   to->tv_nsec = nsecs.count();
+  to->clock_type = GPR_CLOCK_REALTIME;
 }
 
 void TimepointHR2Timespec(const high_resolution_clock::time_point& from,
@@ -74,6 +75,7 @@
   nanoseconds nsecs = duration_cast<nanoseconds>(deadline - secs);
   to->tv_sec = secs.count();
   to->tv_nsec = nsecs.count();
+  to->clock_type = GPR_CLOCK_REALTIME;
 }
 
 system_clock::time_point Timespec2Timepoint(gpr_timespec t) {
diff --git a/src/node/ext/completion_queue_async_worker.cc b/src/node/ext/completion_queue_async_worker.cc
index 4be208c..1215c97 100644
--- a/src/node/ext/completion_queue_async_worker.cc
+++ b/src/node/ext/completion_queue_async_worker.cc
@@ -62,7 +62,8 @@
 CompletionQueueAsyncWorker::~CompletionQueueAsyncWorker() {}
 
 void CompletionQueueAsyncWorker::Execute() {
-  result = grpc_completion_queue_next(queue, gpr_inf_future);
+  result =
+      grpc_completion_queue_next(queue, gpr_inf_future(GPR_CLOCK_REALTIME));
   if (!result.success) {
     SetErrorMessage("The batch encountered an error");
   }
diff --git a/src/node/ext/server.cc b/src/node/ext/server.cc
index 51c55ba..34cde9f 100644
--- a/src/node/ext/server.cc
+++ b/src/node/ext/server.cc
@@ -161,7 +161,8 @@
     grpc_server_shutdown_and_notify(this->wrapped_server,
                                     this->shutdown_queue,
                                     NULL);
-    grpc_completion_queue_pluck(this->shutdown_queue, NULL, gpr_inf_future);
+    grpc_completion_queue_pluck(this->shutdown_queue, NULL,
+                                gpr_inf_future(GPR_CLOCK_REALTIME));
     this->wrapped_server = NULL;
   }
 }
diff --git a/src/node/ext/timeval.cc b/src/node/ext/timeval.cc
index bc3237f..e3620fc 100644
--- a/src/node/ext/timeval.cc
+++ b/src/node/ext/timeval.cc
@@ -42,18 +42,18 @@
 
 gpr_timespec MillisecondsToTimespec(double millis) {
   if (millis == std::numeric_limits<double>::infinity()) {
-    return gpr_inf_future;
+    return gpr_inf_future(GPR_CLOCK_REALTIME);
   } else if (millis == -std::numeric_limits<double>::infinity()) {
-    return gpr_inf_past;
+    return gpr_inf_past(GPR_CLOCK_REALTIME);
   } else {
     return gpr_time_from_micros(static_cast<int64_t>(millis * 1000));
   }
 }
 
 double TimespecToMilliseconds(gpr_timespec timespec) {
-  if (gpr_time_cmp(timespec, gpr_inf_future) == 0) {
+  if (gpr_time_cmp(timespec, gpr_inf_future(GPR_CLOCK_REALTIME)) == 0) {
     return std::numeric_limits<double>::infinity();
-  } else if (gpr_time_cmp(timespec, gpr_inf_past) == 0) {
+  } else if (gpr_time_cmp(timespec, gpr_inf_past(GPR_CLOCK_REALTIME)) == 0) {
     return -std::numeric_limits<double>::infinity();
   } else {
     return (static_cast<double>(timespec.tv_sec) * 1000 +
diff --git a/src/python/src/grpc/_adapter/_c/utility.c b/src/python/src/grpc/_adapter/_c/utility.c
index b82b042..000c8d0 100644
--- a/src/python/src/grpc/_adapter/_c/utility.c
+++ b/src/python/src/grpc/_adapter/_c/utility.c
@@ -390,6 +390,7 @@
   } else {
     result.tv_sec = (time_t)seconds;
     result.tv_nsec = ((seconds - result.tv_sec) * 1e9);
+    result.clock_type = GPR_CLOCK_REALTIME;
   }
   return result;
 }
diff --git a/src/ruby/ext/grpc/rb_grpc.c b/src/ruby/ext/grpc/rb_grpc.c
index 706a2a7..b0ecbce 100644
--- a/src/ruby/ext/grpc/rb_grpc.c
+++ b/src/ruby/ext/grpc/rb_grpc.c
@@ -222,24 +222,31 @@
   return rb_funcall(grpc_rb_time_val_to_time(self), id_to_s, 0);
 }
 
+static gpr_timespec zero_realtime;
+static gpr_timespec inf_future_realtime;
+static gpr_timespec inf_past_realtime;
+
 /* Adds a module with constants that map to gpr's static timeval structs. */
 static void Init_grpc_time_consts() {
   VALUE grpc_rb_mTimeConsts =
       rb_define_module_under(grpc_rb_mGrpcCore, "TimeConsts");
   grpc_rb_cTimeVal =
       rb_define_class_under(grpc_rb_mGrpcCore, "TimeSpec", rb_cObject);
+  zero_realtime = gpr_time_0(GPR_CLOCK_REALTIME);
+  inf_future_realtime = gpr_inf_future(GPR_CLOCK_REALTIME);
+  inf_past_realtime = gpr_inf_past(GPR_CLOCK_REALTIME);
   rb_define_const(
       grpc_rb_mTimeConsts, "ZERO",
       TypedData_Wrap_Struct(grpc_rb_cTimeVal, &grpc_rb_timespec_data_type,
-                            (void *)&gpr_time_0));
+                            (void *)&zero_realtime));
   rb_define_const(
       grpc_rb_mTimeConsts, "INFINITE_FUTURE",
       TypedData_Wrap_Struct(grpc_rb_cTimeVal, &grpc_rb_timespec_data_type,
-                            (void *)&gpr_inf_future(GPR_CLOCK_REALTIME)));
+                            (void *)&inf_future_realtime));
   rb_define_const(
       grpc_rb_mTimeConsts, "INFINITE_PAST",
       TypedData_Wrap_Struct(grpc_rb_cTimeVal, &grpc_rb_timespec_data_type,
-                            (void *)&gpr_inf_past(GPR_CLOCK_REALTIME)));
+                            (void *)&inf_past_realtime));
   rb_define_method(grpc_rb_cTimeVal, "to_time", grpc_rb_time_val_to_time, 0);
   rb_define_method(grpc_rb_cTimeVal, "inspect", grpc_rb_time_val_inspect, 0);
   rb_define_method(grpc_rb_cTimeVal, "to_s", grpc_rb_time_val_to_s, 0);