summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-17 02:15:08 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-17 02:15:08 +0000
commit37bebbf64b99fb617a4327917a16593a786684f0 (patch)
tree67a908bb6f07ee1848b99f37c1720d1334e65b8f
parentc89bdeeeaf42126500a54a979723fca905c4414c (diff)
count days
-rw-r--r--usr.bin/w/pr_time.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/w/pr_time.c b/usr.bin/w/pr_time.c
index c126969a265..7c43aebf55a 100644
--- a/usr.bin/w/pr_time.c
+++ b/usr.bin/w/pr_time.c
@@ -91,6 +91,8 @@ void
pr_idle(idle)
time_t idle;
{
+ int days = idle / SECSPERDAY;
+
/* If idle more than 36 hours, print as a number of days. */
if (idle >= 36 * SECSPERHOUR)
printf(days == 1 ? " %dday " : " %ddays ", days);