| author | |
| committer | |
| log | 3239f672d2aa61ad0fea0f400cd7917fa354ea0f |
| tree | 442ab5a92c798c5ec813e704da0a0567e1d07fa0 |
| parent | 9daad52a12deaa0bc53f9a54cfad3e5c7ae907d7 |
this makes it possible to compare e.g. file stat results without
knowing implementation details for Timestamp1 files changed, 4 insertions(+), 0 deletions(-)
lib/std/Io.zig+4| ... | ... | @@ -981,6 +981,10 @@ pub const Timestamp = struct { |
| 981 | 981 | const now_ts = clock.now(io); |
| 982 | 982 | return t.durationTo(now_ts); |
| 983 | 983 | } |
| 984 | ||
| 985 | pub fn compare(lhs: Timestamp, op: math.CompareOperator, rhs: Timestamp) bool { | |
| 986 | return math.compare(lhs.nanoseconds, op, rhs.nanoseconds); | |
| 987 | } | |
| 984 | 988 | }; |
| 985 | 989 | |
| 986 | 990 | pub const Duration = struct { |