Skip to content
Snippets Groups Projects
Commit 92a17d7a authored by Craig Tiller's avatar Craig Tiller
Browse files

Make api_fuzzer mac ready

parent a687250f
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment