authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-26 16:16:14 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-04-26 16:16:14 -07:00
log169ddf27878a69283270a891e82661bc70b79dda
treea3f6aba2293cbe2f1522fd2f2d3b455118f35632
parent7e0739b5d4393b8c3322acda18d005eff182fc88
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

add microTimestamp


1 files changed, 4 insertions(+), 0 deletions(-)

time.zig+4
......@@ -561,6 +561,10 @@ pub fn nanoTimestamp() i128 {
561561 return result;
562562}
563563
564pub fn microTimestamp() i64 {
565 return @as(i64, @intCast(@divFloor(nanoTimestamp(), ns_per_us)));
566}
567
564568pub fn milliTimestamp() i64 {
565569 return @as(i64, @intCast(@divFloor(nanoTimestamp(), ns_per_ms)));
566570}