From 2ae48e9c173247a8aaf5641424734aef6d721b34 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 23 Sep 2015 18:00:38 -0500 Subject: [PATCH] FS-8215 #resolve [MacOSX nanosleep is not super accurate] --- src/switch_time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_time.c b/src/switch_time.c index b539d9be10..01e6dfab15 100644 --- a/src/switch_time.c +++ b/src/switch_time.c @@ -175,7 +175,7 @@ static void do_sleep(switch_interval_time_t t) #elif defined(DARWIN) t -= OFFSET; ts.tv_sec = t / APR_USEC_PER_SEC; - ts.tv_nsec = (t % APR_USEC_PER_SEC) * 1000; + ts.tv_nsec = (t % APR_USEC_PER_SEC) * 850; nanosleep(&ts, NULL); #else apr_sleep(t);