summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-attach-session.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-09-10 08:58:14 +0000
committernicm <nicm@openbsd.org>2015-09-10 08:58:14 +0000
commite77c256d9873828a497deb0f368987ec3587d4ba (patch)
treebd8e852e18bcaffbfa007b7bc40417641ebb63a6 /usr.bin/tmux/cmd-attach-session.c
parentRemove link_addr(3). A function to encode the name of an interface in (diff)
downloadwireguard-openbsd-e77c256d9873828a497deb0f368987ec3587d4ba.tar.xz
wireguard-openbsd-e77c256d9873828a497deb0f368987ec3587d4ba.zip
Add session_last_attached time and format, from Sina Siadat.
Diffstat (limited to 'usr.bin/tmux/cmd-attach-session.c')
-rw-r--r--usr.bin/tmux/cmd-attach-session.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-attach-session.c b/usr.bin/tmux/cmd-attach-session.c
index 0f885bcafca..df7f08d6657 100644
--- a/usr.bin/tmux/cmd-attach-session.c
+++ b/usr.bin/tmux/cmd-attach-session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-attach-session.c,v 1.40 2015/08/28 13:01:03 nicm Exp $ */
+/* $OpenBSD: cmd-attach-session.c,v 1.41 2015/09/10 08:58:14 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -136,6 +136,7 @@ cmd_attach_session(struct cmd_q *cmdq, const char *tflag, int dflag, int rflag,
status_timer_start(c);
notify_attached_session_changed(c);
session_update_activity(s, NULL);
+ gettimeofday(&s->last_attached_time, NULL);
server_redraw_client(c);
s->curw->flags &= ~WINLINK_ALERTFLAGS;
} else {
@@ -181,6 +182,7 @@ cmd_attach_session(struct cmd_q *cmdq, const char *tflag, int dflag, int rflag,
status_timer_start(c);
notify_attached_session_changed(c);
session_update_activity(s, NULL);
+ gettimeofday(&s->last_attached_time, NULL);
server_redraw_client(c);
s->curw->flags &= ~WINLINK_ALERTFLAGS;