Commit 8cf33e1
Eric Bower
·
2026-02-20 20:25:29 -0500 EST
parent 58eb669
chore: nanoTimestamp -> timestamp
1 files changed,
+10,
-7
+10,
-7
| ... | ... | @@ -422,7 +422,7 @@ pub fn main() !void { | |
| 422 | 422 | .pid = undefined, | |
| 423 | 423 | .command = command, | |
| 424 | 424 | .cwd = cwd, | |
| 425 | - | .created_at = @intCast(std.time.nanoTimestamp()), | |
| 425 | + | .created_at = @intCast(std.time.timestamp()), | |
| 426 | 426 | }; | |
| 427 | 427 | daemon.socket_path = try getSocketPath(alloc, cfg.socket_dir, sesh); | |
| 428 | 428 | std.log.info("socket path={s}", .{daemon.socket_path}); |
| ... | ... | @@ -464,7 +464,7 @@ pub fn main() !void { | |
| 464 | 464 | .pid = undefined, | |
| 465 | 465 | .command = null, | |
| 466 | 466 | .cwd = cwd, | |
| 467 | - | .created_at = @intCast(std.time.nanoTimestamp()), | |
| 467 | + | .created_at = @intCast(std.time.timestamp()), | |
| 468 | 468 | .is_task_mode = true, | |
| 469 | 469 | .task_command = cmd_args_raw.items, | |
| 470 | 470 | }; |
| ... | ... | @@ -1337,7 +1337,7 @@ fn daemonLoop(daemon: *Daemon, server_sock_fd: i32, pty_fd: i32) !void { | |
| 1337 | 1337 | if (daemon.is_task_mode and daemon.task_exit_code == null) { | |
| 1338 | 1338 | if (findTaskExitMarker(buf[0..n])) |exit_code| { | |
| 1339 | 1339 | daemon.task_exit_code = exit_code; | |
| 1340 | - | daemon.task_ended_at = @intCast(std.time.nanoTimestamp()); | |
| 1340 | + | daemon.task_ended_at = @intCast(std.time.timestamp()); | |
| 1341 | 1341 | ||
| 1342 | 1342 | std.log.info("task completed exit_code={d}", .{exit_code}); | |
| 1343 | 1343 | // Shell continues running - no break here |
| ... | ... | @@ -1666,10 +1666,13 @@ fn writeSessionLine(writer: *std.Io.Writer, session: SessionEntry, short: bool, | |
| 1666 | 1666 | session.created_at, | |
| 1667 | 1667 | }); | |
| 1668 | 1668 | if (session.task_ended_at) |ended_at| { | |
| 1669 | - | try writer.print("\ttask_ended_at={d}", .{ended_at}); | |
| 1670 | - | } | |
| 1671 | - | if (session.task_exit_code) |exit_code| { | |
| 1672 | - | try writer.print("\ttask_exit_code={d}", .{exit_code}); | |
| 1669 | + | if (ended_at > 0) { | |
| 1670 | + | try writer.print("\ttask_ended_at={d}", .{ended_at}); | |
| 1671 | + | ||
| 1672 | + | if (session.task_exit_code) |exit_code| { | |
| 1673 | + | try writer.print("\ttask_exit_code={d}", .{exit_code}); | |
| 1674 | + | } | |
| 1675 | + | } | |
| 1673 | 1676 | } | |
| 1674 | 1677 | if (session.cwd) |cwd| { | |
| 1675 | 1678 | try writer.print("\tstarted_in={s}", .{cwd}); |