diff options
| author | Rémi Verschelde | 2017-08-29 00:07:07 +0200 |
|---|---|---|
| committer | GitHub | 2017-08-29 00:07:07 +0200 |
| commit | 9a8a0e20e5b73b6536c92b7b68e827e4f6d18f48 (patch) | |
| tree | a9ccf069b84d7dc7f124d8880d502ab2b133f153 /drivers/unix/os_unix.cpp | |
| parent | 0f7376921f8e1d150933c3abb0474b9e8a8d14cc (diff) | |
| parent | d806ad4a3dcf7308147e1a243092d22091560d7d (diff) | |
| download | godot-9a8a0e20e5b73b6536c92b7b68e827e4f6d18f48.tar.gz godot-9a8a0e20e5b73b6536c92b7b68e827e4f6d18f48.tar.zst godot-9a8a0e20e5b73b6536c92b7b68e827e4f6d18f48.zip | |
Diffstat (limited to 'drivers/unix/os_unix.cpp')
| -rw-r--r-- | drivers/unix/os_unix.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index 992b12b7c..75c8a153f 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -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 { |
