mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 23:58:50 +00:00
time: yield accurate_sleep instead of relaxing the cpu
This commit is contained in:
@@ -35,3 +35,7 @@ _tick_now :: proc "contextless" () -> Tick {
|
||||
_nsec := mul_div_u64(i64(now), 1e9, i64(qpc_frequency))
|
||||
return Tick{_nsec = _nsec}
|
||||
}
|
||||
|
||||
_yield :: proc "contextless" () {
|
||||
win32.SwitchToThread()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user