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:
Yonggang Luo 2022-03-25 03:44:30 +08:00 committed by Marge Bot
parent 65d5ee4012
commit 672a93cd6d
1 changed files with 0 additions and 4 deletions

View File

@ -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);