aboutsummaryrefslogtreecommitdiff
path: root/core/encoding
diff options
context:
space:
mode:
authorFeoramund <161657516+Feoramund@users.noreply.github.com>2024-06-22 18:36:42 -0400
committerFeoramund <161657516+Feoramund@users.noreply.github.com>2024-06-22 18:36:42 -0400
commitca58d7771b3964e47779b1aad7bfb4c29a17f43a (patch)
treecc6044cec50f5326e7c182d62633233e68d81027 /core/encoding
parent8a4a3ed66e9fc2e4ecc398acb616a6c3b756515e (diff)
Use new API `from_nanoseconds` in `uuid`
Diffstat (limited to 'core/encoding')
-rw-r--r--core/encoding/uuid/reading.odin6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/encoding/uuid/reading.odin b/core/encoding/uuid/reading.odin
index ab08300b0..c91c82465 100644
--- a/core/encoding/uuid/reading.odin
+++ b/core/encoding/uuid/reading.odin
@@ -163,7 +163,7 @@ Returns:
- timestamp: The timestamp of the UUID.
*/
time_v1 :: proc "contextless" (id: Identifier) -> (timestamp: time.Time) {
- return { _nsec = cast(i64)(raw_time_v1(id) - HNS_INTERVALS_BETWEEN_GREG_AND_UNIX) * 100 }
+ return time.from_nanoseconds(cast(i64)(raw_time_v1(id) - HNS_INTERVALS_BETWEEN_GREG_AND_UNIX) * 100)
}
/*
@@ -194,7 +194,7 @@ Returns:
- timestamp: The timestamp, in 100-nanosecond intervals since 1582-10-15.
*/
time_v6 :: proc "contextless" (id: Identifier) -> (timestamp: time.Time) {
- return { _nsec = cast(i64)(raw_time_v6(id) - HNS_INTERVALS_BETWEEN_GREG_AND_UNIX) * 100 }
+ return time.from_nanoseconds(cast(i64)(raw_time_v6(id) - HNS_INTERVALS_BETWEEN_GREG_AND_UNIX) * 100)
}
/*
@@ -221,7 +221,7 @@ Returns:
- timestamp: The timestamp, in milliseconds since the UNIX epoch.
*/
time_v7 :: proc "contextless" (id: Identifier) -> (timestamp: time.Time) {
- return { _nsec = cast(i64)raw_time_v7(id) * 1e6 }
+ return time.from_nanoseconds(cast(i64)raw_time_v7(id) * 1e6)
}
/*