mirror of https://gitlab.freedesktop.org/mesa/mesa
util: Use timespec_get directly, it's always present
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>
This commit is contained in:
parent
65d5ee4012
commit
672a93cd6d
|
@ -183,11 +183,7 @@ _util_queue_fence_wait_timeout(struct util_queue_fence *fence,
|
|||
if (rel > 0) {
|
||||
struct timespec ts;
|
||||
|
||||
#if defined(HAVE_TIMESPEC_GET) || defined(_WIN32)
|
||||
timespec_get(&ts, TIME_UTC);
|
||||
#else
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
#endif
|
||||
|
||||
ts.tv_sec += abs_timeout / (1000*1000*1000);
|
||||
ts.tv_nsec += abs_timeout % (1000*1000*1000);
|
||||
|
|
Loading…
Reference in New Issue