box2d: update to 3.1.0

This commit is contained in:
Laytan Laats
2025-04-22 22:38:15 +02:00
parent c7f9d2b1b7
commit e086151fcd
15 changed files with 1204 additions and 706 deletions
+30
View File
@@ -0,0 +1,30 @@
package odin_libc
import "core:time"
Clock :: enum i32 {
Monotonic = 1,
}
Time_Spec :: struct {
tv_sec: i64,
tv_nsec: i64,
}
@(require, linkage="strong", link_name="clock_gettime")
clock_gettine :: proc "c" (clockid: Clock, tp: ^Time_Spec) -> i32 {
switch clockid {
case .Monotonic:
tick := time.tick_now()
tp.tv_sec = tick._nsec/1e9
tp.tv_nsec = tick._nsec%1e9/1000
return 0
case: return -1
}
}
@(require, linkage="strong", link_name="sched_yield")
sched_yield :: proc "c" () -> i32 {
return 0
}