mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 18:02:02 +00:00
20 lines
387 B
Odin
20 lines
387 B
Odin
//+private
|
|
package time
|
|
|
|
import "core:sys/es"
|
|
|
|
_IS_SUPPORTED :: true
|
|
|
|
_now :: proc "contextless" () -> Time {
|
|
// TODO Replace once there's a proper time API.
|
|
return Time{_nsec = i64(es.TimeStampMs() * 1e6)}
|
|
}
|
|
|
|
_sleep :: proc "contextless" (d: Duration) {
|
|
es.Sleep(u64(d/Millisecond))
|
|
}
|
|
|
|
_tick_now :: proc "contextless" () -> Tick {
|
|
return Tick{_nsec = i64(es.TimeStampMs() * 1e6)}
|
|
}
|