mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
FS-8215: MacOSX nanosleep is not super accurate, use scaling factor to get it closer to correct
This commit is contained in:
parent
4977f608fe
commit
8681d42167
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user