diff options
author | 1996-06-17 02:15:07 +0000 | |
---|---|---|
committer | 1996-06-17 02:15:07 +0000 | |
commit | 018cd5aff1dd1e52290699a0c743cfffb7fc4fb1 (patch) | |
tree | 68a98bd06dbc75794a91971d2affb7cbeb0bec6d | |
parent | fdeject: into the void (diff) | |
download | wireguard-openbsd-018cd5aff1dd1e52290699a0c743cfffb7fc4fb1.tar.xz wireguard-openbsd-018cd5aff1dd1e52290699a0c743cfffb7fc4fb1.zip |
count days
-rw-r--r-- | usr.bin/w/pr_time.c | 2 |
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); |