From 9cad8179b77a47ad78976ad687e93a8872cbd393 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Mon, 22 Jul 2024 20:00:25 +0200 Subject: [PATCH] Clarify core:time Unix timestamp --- core/time/time.odin | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/time/time.odin b/core/time/time.odin index ef2bc0aed..fad6512f3 100644 --- a/core/time/time.odin +++ b/core/time/time.odin @@ -5,6 +5,7 @@ import dt "core:time/datetime" /* Type representing duration, with nanosecond precision. +This is the regular Unix timestamp, scaled to nanosecond precision. */ Duration :: distinct i64 @@ -425,7 +426,7 @@ Alias for `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 { return t._nsec/1e9 @@ -437,7 +438,7 @@ Alias for `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 { return t._nsec