diff options
| author | Pedro J. Estébanez | 2017-08-22 18:02:12 +0200 |
|---|---|---|
| committer | Pedro J. Estébanez | 2017-08-24 07:02:55 +0200 |
| commit | a560a6211868d517908f44e1ea90336b18cdb97d (patch) | |
| tree | 1c62c252a127a3b7ffddaec918e0024f64f4ef94 /drivers/unix/os_unix.cpp | |
| parent | b4ad899ef64df6e341a4cbe52a15109cd3d6b2eb (diff) | |
| download | godot-a560a6211868d517908f44e1ea90336b18cdb97d.tar.gz godot-a560a6211868d517908f44e1ea90336b18cdb97d.tar.zst godot-a560a6211868d517908f44e1ea90336b18cdb97d.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 0f4e8f757..7698bb2fa 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 { |
