From 70ef29a006ceed7379df8801e3889da197de36ce Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Wed, 10 Jun 2026 01:43:16 -0700 Subject: [PATCH] add timestamp --- time.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/time.zig b/time.zig index 9ac346984d42e233ee5aed2c125595076cb0922d..09ce9ec4b006acf7a6f3ee06584809a8765ad5ac 100644 --- a/time.zig +++ b/time.zig @@ -581,6 +581,10 @@ pub fn milliTimestamp() i64 { return @as(i64, @intCast(@divFloor(nanoTimestamp(), ns_per_ms))); } +pub fn timestamp() i64 { + return @as(i64, @intCast(@divFloor(nanoTimestamp(), ns_per_s))); +} + pub const Instant = struct { timestamp_ns: u64, -- 2.54.0