From: Martin Mares Date: Fri, 2 Oct 1998 21:43:09 +0000 (+0000) Subject: Fixed calculation of idle time. *Again*. X-Git-Tag: v1.12~26 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=5b75a003e9548a7b7a1d63a1f287cd0491809ba3;p=ywho.git Fixed calculation of idle time. *Again*. --- diff --git a/ywho.c b/ywho.c index 373e613..913a380 100644 --- a/ywho.c +++ b/ywho.c @@ -1,7 +1,7 @@ /* * Extended `who' command, version 1.8. * - * (c) 1996, 1997 Martin Mares + * (c) 1996--1998 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU General Public License. See file COPYING in any of the GNU packages. @@ -111,10 +111,12 @@ readutmp(void) { u->mesg = !!(S_IWGRP & st.st_mode); u->click_time = st.st_atime; - if (u->click_time < st.st_atime) - u->click_time = st.st_atime; +#if 0 + if (u->click_time < st.st_mtime) + u->click_time = st.st_mtime; if (u->click_time < st.st_ctime) u->click_time = st.st_ctime; +#endif } u->detach = 0; usercnt++;