| author | |
| committer | |
| log | 19c9062840225cc927db105ba1454a0e189901fa |
| tree | 611aef40007c173d22354bc6a527344779e32eb8 |
| parent | 250803661c2a3642c413e0ebb25475605093873e |
1 files changed, 4 insertions(+), 0 deletions(-)
lib/std/Io.zig+4| ... | ... | @@ -903,6 +903,10 @@ pub const Timestamp = struct { |
| 903 | 903 | return .{ .nanoseconds = x }; |
| 904 | 904 | } |
| 905 | 905 | |
| 906 | pub fn toMilliseconds(t: Timestamp) i64 { | |
| 907 | return @intCast(@divTrunc(t.nanoseconds, std.time.ns_per_ms)); | |
| 908 | } | |
| 909 | ||
| 906 | 910 | pub fn toSeconds(t: Timestamp) i64 { |
| 907 | 911 | return @intCast(@divTrunc(t.nanoseconds, std.time.ns_per_s)); |
| 908 | 912 | } |