Merge pull request #10552 from RandomShaper/improve-posix

Improve Mac/UNIX conformance/reliability
This commit is contained in:
Rémi Verschelde 2017-08-29 00:07:07 +02:00 committed by GitHub
commit 9a8a0e20e5
5 changed files with 35 additions and 5 deletions

View file

@ -315,7 +315,9 @@ OS::TimeZoneInfo OS_Unix::get_time_zone_info() const {
void OS_Unix::delay_usec(uint32_t p_usec) const {
usleep(p_usec);
struct timespec rem = { p_usec / 1000000, (p_usec % 1000000) * 1000 };
while (nanosleep(&rem, &rem) == EINTR) {
}
}
uint64_t OS_Unix::get_ticks_usec() const {