summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-06-17 02:15:07 +0000
committerderaadt <deraadt@openbsd.org>1996-06-17 02:15:07 +0000
commit018cd5aff1dd1e52290699a0c743cfffb7fc4fb1 (patch)
tree68a98bd06dbc75794a91971d2affb7cbeb0bec6d
parentfdeject: into the void (diff)
downloadwireguard-openbsd-018cd5aff1dd1e52290699a0c743cfffb7fc4fb1.tar.xz
wireguard-openbsd-018cd5aff1dd1e52290699a0c743cfffb7fc4fb1.zip
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);