Mesa (main): util: Use timespec_get directly, it's always present

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 9 18:00:21 UTC 2022


Module: Mesa
Branch: main
Commit: 672a93cd6d65493fd7d91cc4c45072f1b69efc58
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=672a93cd6d65493fd7d91cc4c45072f1b69efc58

Author: Yonggang Luo <luoyonggang at gmail.com>
Date:   Fri Mar 25 03:44:30 2022 +0800

util: Use timespec_get directly, it's always present

Signed-off-by: Yonggang Luo <luoyonggang at gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15497>

---

 src/util/u_queue.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/util/u_queue.c b/src/util/u_queue.c
index d7da1af6060..1a73ffdbd5b 100644
--- a/src/util/u_queue.c
+++ b/src/util/u_queue.c
@@ -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);



More information about the mesa-commit mailing list