util: Always use timespec_get on Windows.

include/c11/threads_win32.h provides a fallback implementation of
timespec_get when necessary.

Fixes https://gitlab.freedesktop.org/mesa/mesa/-/issues/4109

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9280>
This commit is contained in:
Jose Fonseca 2021-02-24 20:02:34 +00:00 committed by Marge Bot
parent 3a72044ece
commit 3ba7784b1e

View file

@ -183,7 +183,7 @@ _util_queue_fence_wait_timeout(struct util_queue_fence *fence,
if (rel > 0) {
struct timespec ts;
#ifdef HAVE_TIMESPEC_GET
#if defined(HAVE_TIMESPEC_GET) || defined(_WIN32)
timespec_get(&ts, TIME_UTC);
#else
clock_gettime(CLOCK_REALTIME, &ts);