From 2e42373d218d3ebcc16c190e98a72f36799a5e46 Mon Sep 17 00:00:00 2001 From: Frederic Plourde Date: Fri, 13 May 2022 15:16:11 -0400 Subject: [PATCH] aux/os: Fix os_semaphore_get_realtime_clock() Function was previously using output param 'ts' as input for computing 'now' internally. --- src/xrt/auxiliary/os/os_threading.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xrt/auxiliary/os/os_threading.h b/src/xrt/auxiliary/os/os_threading.h index 375e6eaf0..34156b7c9 100644 --- a/src/xrt/auxiliary/os/os_threading.h +++ b/src/xrt/auxiliary/os/os_threading.h @@ -253,7 +253,7 @@ os_semaphore_get_realtime_clock(struct timespec *ts, uint64_t timeout_ns) assert(false); return -1; } - uint64_t now_ns = os_timespec_to_ns(ts); + uint64_t now_ns = os_timespec_to_ns(&now); uint64_t when_ns = timeout_ns + now_ns; os_ns_to_timespec(when_ns, ts);