fix compile for android bionic c lib
This commit is contained in:
1 parent
2f9a400cf3
commit
9160431556
1 file changed
+4
@@ -1405,7 +1405,11 @@ void I_SleepDuration(precise_t duration)
|
||||
duration -= slack;
|
||||
struct timespec ts = {
|
||||
.tv_sec = static_cast<__time_t>(duration / precision),
|
||||
#ifdef __BIONIC__
|
||||
.tv_nsec = static_cast<long>(duration * 1000000000 / precision % 1000000000),
|
||||
#else
|
||||
.tv_nsec = static_cast<__syscall_slong_t>(duration * 1000000000 / precision % 1000000000),
|
||||
#endif
|
||||
};
|
||||
int status;
|
||||
do status = clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, &ts);
|
||||
|
||||
Reference in new issue
Block a user