mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
core/sync: fix wrong timeout calculation, time.Duration is ns already
This commit is contained in:
@@ -52,7 +52,7 @@ _futex_wait_with_timeout :: proc "contextless" (f: ^Futex, expected: u32, durati
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
timeout_ns := u32(duration) * 1000
|
timeout_ns := u32(duration)
|
||||||
s := __ulock_wait(UL_COMPARE_AND_WAIT | ULF_NO_ERRNO, f, u64(expected), timeout_ns)
|
s := __ulock_wait(UL_COMPARE_AND_WAIT | ULF_NO_ERRNO, f, u64(expected), timeout_ns)
|
||||||
if s >= 0 {
|
if s >= 0 {
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user