aboutsummaryrefslogtreecommitdiff
path: root/core/time
diff options
context:
space:
mode:
Diffstat (limited to 'core/time')
-rw-r--r--core/time/time.odin8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/time/time.odin b/core/time/time.odin
index eb35ac0d9..00d7e529a 100644
--- a/core/time/time.odin
+++ b/core/time/time.odin
@@ -1,5 +1,7 @@
package time
+import "intrinsics"
+
Duration :: distinct i64;
Nanosecond :: Duration(1);
@@ -137,11 +139,7 @@ clock :: proc(t: Time) -> (hour, min, sec: int) {
read_cycle_counter :: proc() -> u64 {
- foreign _ {
- @(link_name="llvm.readcyclecounter")
- llvm_readcyclecounter :: proc "none" () -> u64 ---
- }
- return llvm_readcyclecounter();
+ return u64(intrinsics.read_cycle_counter());
}