Browse Source

core/sync: fix wrong timeout calculation, `time.Duration` is ns already

Laytan Laats 1 year ago
parent
commit
b35e72c82b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/sync/futex_darwin.odin

+ 1 - 1
core/sync/futex_darwin.odin

@@ -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