mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
aux/os: Fix os_semaphore_get_realtime_clock()
Function was previously using output param 'ts' as input for computing 'now' internally.
This commit is contained in:
parent
8ac95a5177
commit
2e42373d21
|
@ -253,7 +253,7 @@ os_semaphore_get_realtime_clock(struct timespec *ts, uint64_t timeout_ns)
|
||||||
assert(false);
|
assert(false);
|
||||||
return -1;
|
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;
|
uint64_t when_ns = timeout_ns + now_ns;
|
||||||
|
|
||||||
os_ns_to_timespec(when_ns, ts);
|
os_ns_to_timespec(when_ns, ts);
|
||||||
|
|
Loading…
Reference in a new issue