aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/support
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-02-02 10:29:04 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-02-02 10:29:04 -0800
commit5395aba78b914e933d81822ccbbed1a343cdcd91 (patch)
treed6c71e05095d89aead716608238204e42b17616f /src/core/lib/support
parent81bcff7bceb247a548476e7fefcdfb7d9dda97d3 (diff)
parent26623b3d77ae78e66f66b996593acf57a7cf1197 (diff)
Merge github.com:grpc/grpc into bwest
Diffstat (limited to 'src/core/lib/support')
-rw-r--r--src/core/lib/support/time_windows.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/lib/support/time_windows.c b/src/core/lib/support/time_windows.c
index 6459732879..7b94a5b7bf 100644
--- a/src/core/lib/support/time_windows.c
+++ b/src/core/lib/support/time_windows.c
@@ -56,7 +56,7 @@ void gpr_time_init(void) {
g_time_scale = 1.0 / (double)frequency.QuadPart;
}
-gpr_timespec gpr_now(gpr_clock_type clock) {
+static gpr_timespec now_impl(gpr_clock_type clock) {
gpr_timespec now_tv;
LONGLONG diff;
struct _timeb now_tb;
@@ -84,6 +84,12 @@ gpr_timespec gpr_now(gpr_clock_type clock) {
return now_tv;
}
+gpr_timespec (*gpr_now_impl)(gpr_clock_type clock_type) = now_impl;
+
+gpr_timespec gpr_now(gpr_clock_type clock_type) {
+ return gpr_now_impl(clock_type);
+}
+
void gpr_sleep_until(gpr_timespec until) {
gpr_timespec now;
gpr_timespec delta;