FS-8215: MacOSX nanosleep is not super accurate, use scaling factor to get it closer to correct

This commit is contained in:
Anthony Minessale 2015-09-23 18:00:38 -05:00 committed by Michael Jerris
parent 4977f608fe
commit 8681d42167
1 changed files with 1 additions and 1 deletions

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