aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-04-23 13:40:51 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-04-23 13:40:51 -0700
commit92a17d7a8fea79b7e226d6b4a624b5053a190009 (patch)
treee0ef62d275aa90d1493e8f7d103156765a7ed3ad /src/core
parenta687250fd8d728b610ab40397136979915fa4f19 (diff)
Make api_fuzzer mac ready
Diffstat (limited to 'src/core')
-rw-r--r--src/core/lib/support/time_posix.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/lib/support/time_posix.c b/src/core/lib/support/time_posix.c
index cc0aa2b476..11542072fe 100644
--- a/src/core/lib/support/time_posix.c
+++ b/src/core/lib/support/time_posix.c
@@ -95,12 +95,6 @@ static gpr_timespec now_impl(gpr_clock_type clock_type) {
return gpr_from_timespec(now, clock_type);
}
}
-
-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);
-}
#else
/* For some reason Apple's OSes haven't implemented clock_gettime. */
@@ -120,7 +114,7 @@ void gpr_time_init(void) {
g_time_start = mach_absolute_time();
}
-gpr_timespec gpr_now(gpr_clock_type clock) {
+static gpr_timespec now_impl(gpr_clock_type clock) {
gpr_timespec now;
struct timeval now_tv;
double now_dbl;
@@ -148,6 +142,12 @@ gpr_timespec gpr_now(gpr_clock_type clock) {
}
#endif
+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;