mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-11-03 21:49:42 -09:00
Zig 0.16: timestamp
This commit is contained in:
parent
4595a791b5
commit
a965c5924e
1 changed files with 1 additions and 1 deletions
|
|
@ -143,7 +143,7 @@ pub const Writer = struct {
|
|||
ctx.* = .{ .fd = out };
|
||||
if (main.config.compress) ctx.zstd = ZstdWriter.create();
|
||||
ctx.write("[1,2,{\"progname\":\"ncdu\",\"progver\":\"" ++ main.program_version ++ "\",\"timestamp\":");
|
||||
ctx.writeUint(@intCast(@max(0, std.time.timestamp())));
|
||||
ctx.writeUint(@intCast(@max(0, std.Io.Timestamp.now(main.io, .real).toSeconds())));
|
||||
ctx.writeByte('}');
|
||||
return ctx;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue