summaryrefslogtreecommitdiffstats
path: root/usr.bin/w/pr_time.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-09-27 01:00:18 +0000
committerache <ache@FreeBSD.org>1994-09-27 01:00:18 +0000
commit8802e34cc831f8f35c861ec16b46456240d76fe4 (patch)
treee1ea313cd114b96799ab02289de0ec5cb4806447 /usr.bin/w/pr_time.c
parent0ac72c6208f0fb64e0c40c639987bb629df6d4bb (diff)
downloadFreeBSD-src-8802e34cc831f8f35c861ec16b46456240d76fe4.zip
FreeBSD-src-8802e34cc831f8f35c861ec16b46456240d76fe4.tar.gz
idle time == 0 printed now as "-" like in good old BSD
skip cua* 3 chars as tty* 3 lchars
Diffstat (limited to 'usr.bin/w/pr_time.c')
-rw-r--r--usr.bin/w/pr_time.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/w/pr_time.c b/usr.bin/w/pr_time.c
index 87fffb3..73e44fa 100644
--- a/usr.bin/w/pr_time.c
+++ b/usr.bin/w/pr_time.c
@@ -98,6 +98,9 @@ pr_idle(idle)
(void)printf(" %2d:%02d ",
idle / SECSPERHOUR, (idle % SECSPERHOUR) / SECSPERMIN);
+ else if (idle / SECSPERMIN == 0)
+ (void)printf(" - ");
+
/* Else print the minutes idle. */
else
(void)printf(" %2d ", idle / SECSPERMIN);
OpenPOWER on IntegriCloud