aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Davidson <colrdavidson@gmail.com>2025-07-30 12:51:56 -0700
committerColin Davidson <colrdavidson@gmail.com>2025-07-30 12:51:56 -0700
commit7720a32120429514c806d35e8fdf18018b299d92 (patch)
treee0ed55c7a0bf5cfd660c10a85cca44a0840ed726
parente869b9351bae90a57a4b86fef1b48e2e7e46348a (diff)
parent939fed592dfcd27e7eb14e4222a90a5b7852c0d7 (diff)
Merge remote-tracking branch 'live/master' into spall_v3
-rw-r--r--core/time/tsc_darwin.odin6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/time/tsc_darwin.odin b/core/time/tsc_darwin.odin
index 78d5b33f8..2efd35f20 100644
--- a/core/time/tsc_darwin.odin
+++ b/core/time/tsc_darwin.odin
@@ -2,12 +2,12 @@
package time
import "base:intrinsics"
-import "core:sys/unix"
+@require import "core:sys/unix"
_get_tsc_frequency :: proc "contextless" () -> (freq: u64, ok: bool) {
- if ODIN_ARCH == .amd64 {
+ when ODIN_ARCH == .amd64 {
unix.sysctlbyname("machdep.tsc.frequency", &freq) or_return
- } else if ODIN_ARCH == .arm64 {
+ } else when ODIN_ARCH == .arm64 {
freq = u64(intrinsics.read_cycle_counter_frequency())
} else {
return