mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-03 17:24:39 +00:00
Add time.from_nanoseconds
This commit is contained in:
@@ -220,6 +220,10 @@ unix :: proc "contextless" (sec: i64, nsec: i64) -> Time {
|
||||
return Time{(sec*1e9 + nsec)}
|
||||
}
|
||||
|
||||
from_nanoseconds :: #force_inline proc "contextless" (nsec: i64) -> Time {
|
||||
return Time{nsec}
|
||||
}
|
||||
|
||||
to_unix_seconds :: time_to_unix
|
||||
time_to_unix :: proc "contextless" (t: Time) -> i64 {
|
||||
return t._nsec/1e9
|
||||
|
||||
Reference in New Issue
Block a user