mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 08:08:50 +00:00
Clarify core:time Unix timestamp
This commit is contained in:
+3
-2
@@ -5,6 +5,7 @@ import dt "core:time/datetime"
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Type representing duration, with nanosecond precision.
|
Type representing duration, with nanosecond precision.
|
||||||
|
This is the regular Unix timestamp, scaled to nanosecond precision.
|
||||||
*/
|
*/
|
||||||
Duration :: distinct i64
|
Duration :: distinct i64
|
||||||
|
|
||||||
@@ -425,7 +426,7 @@ Alias for `time_to_unix`.
|
|||||||
to_unix_seconds :: time_to_unix
|
to_unix_seconds :: time_to_unix
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Obtain the unix seconds from a time.
|
Obtain the Unix timestamp in seconds from a Time.
|
||||||
*/
|
*/
|
||||||
time_to_unix :: proc "contextless" (t: Time) -> i64 {
|
time_to_unix :: proc "contextless" (t: Time) -> i64 {
|
||||||
return t._nsec/1e9
|
return t._nsec/1e9
|
||||||
@@ -437,7 +438,7 @@ Alias for `time_to_unix_nano`.
|
|||||||
to_unix_nanoseconds :: time_to_unix_nano
|
to_unix_nanoseconds :: time_to_unix_nano
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Obtain the unix nanoseconds from a time.
|
Obtain the Unix timestamp in nanoseconds from a Time.
|
||||||
*/
|
*/
|
||||||
time_to_unix_nano :: proc "contextless" (t: Time) -> i64 {
|
time_to_unix_nano :: proc "contextless" (t: Time) -> i64 {
|
||||||
return t._nsec
|
return t._nsec
|
||||||
|
|||||||
Reference in New Issue
Block a user