]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8215 #resolve [MacOSX nanosleep is not super accurate]
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 23 Sep 2015 23:00:38 +0000 (18:00 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 23 Sep 2015 23:00:44 +0000 (18:00 -0500)
src/switch_time.c

index b539d9be10e72ff067dc41f7f276b1b5ed58ef8b..01e6dfab1563b8226b72dbe09d160deef13303c2 100644 (file)
@@ -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);