mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +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)}
|
return Time{(sec*1e9 + nsec)}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
from_nanoseconds :: #force_inline proc "contextless" (nsec: i64) -> Time {
|
||||||
|
return Time{nsec}
|
||||||
|
}
|
||||||
|
|
||||||
to_unix_seconds :: time_to_unix
|
to_unix_seconds :: time_to_unix
|
||||||
time_to_unix :: proc "contextless" (t: Time) -> i64 {
|
time_to_unix :: proc "contextless" (t: Time) -> i64 {
|
||||||
return t._nsec/1e9
|
return t._nsec/1e9
|
||||||
|
|||||||
Reference in New Issue
Block a user