diff --git a/lib/std/Io.zig b/lib/std/Io.zig index 4fcd32a0a8e7da3ba2f872ea02636f8107ff0e83..b408b847ff34e1c70007d7528581b33895e216b5 100644 --- a/lib/std/Io.zig +++ b/lib/std/Io.zig @@ -981,6 +981,10 @@ pub const Timestamp = struct { const now_ts = clock.now(io); return t.durationTo(now_ts); } + + pub fn compare(lhs: Timestamp, op: math.CompareOperator, rhs: Timestamp) bool { + return math.compare(lhs.nanoseconds, op, rhs.nanoseconds); + } }; pub const Duration = struct {