diff options
author | nicm <nicm> | 2015-09-10 08:58:14 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-09-10 08:58:14 +0000 |
commit | cfabe30becba6f0c54035a29ee61a6a7f3d0cf60 (patch) | |
tree | b31b518b32858cf89f019484b95bf65c69e3d24f /format.c | |
parent | 67ee995cc1ec0a9ae2247dae6bdde54211be8c5a (diff) |
Add session_last_attached time and format, from Sina Siadat.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -872,6 +872,13 @@ format_defaults_session(struct format_tree *ft, struct session *s) format_add(ft, "session_created", "%lld", (long long) t); format_add(ft, "session_created_string", "%s", format_time_string(t)); + t = s->last_attached_time.tv_sec; + if (t != 0) { /* zero if never attached */ + format_add(ft, "session_last_attached", "%lld", (long long) t); + format_add(ft, "session_last_attached_string", "%s", + format_time_string(t)); + } + t = s->activity_time.tv_sec; format_add(ft, "session_activity", "%lld", (long long) t); format_add(ft, "session_activity_string", "%s", format_time_string(t)); |