Fixes:
e3a8013de8ca "util/u_queue: add util_queue_fence_wait_timeout"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1020
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4088
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Yurii Kolesnykov <root@yurikoles.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8482>
if (rel > 0) {
struct timespec ts;
+#ifdef HAVE_TIMESPEC_GET
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);