FS-8215 #resolve [MacOSX nanosleep is not super accurate]

This commit is contained in:
Anthony Minessale 2015-09-23 18:00:38 -05:00
parent c167eb7d5d
commit 2ae48e9c17

View 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);