s_per_min in format.zig
This commit is contained in:
parent
62ee9b3e32
commit
e90bcde2cf
1 changed files with 1 additions and 1 deletions
|
|
@ -245,7 +245,7 @@ pub fn fmtTimeAgo(buf: []u8, timestamp: i64) []const u8 {
|
|||
if (delta < 0) return "just now";
|
||||
if (delta < 60) return "just now";
|
||||
if (delta < std.time.s_per_hour) {
|
||||
return std.fmt.bufPrint(buf, "{d}m ago", .{@as(u64, @intCast(@divFloor(delta, 60)))}) catch "?";
|
||||
return std.fmt.bufPrint(buf, "{d}m ago", .{@as(u64, @intCast(@divFloor(delta, std.time.s_per_min)))}) catch "?";
|
||||
}
|
||||
if (delta < std.time.s_per_day) {
|
||||
return std.fmt.bufPrint(buf, "{d}h ago", .{@as(u64, @intCast(@divFloor(delta, std.time.s_per_hour)))}) catch "?";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue