aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1995-08-28 11:26:29 +0000
committerDavid Greenman <dg@FreeBSD.org>1995-08-28 11:26:29 +0000
commita269dff5f16bbc62846009a9734259e88d37b459 (patch)
tree9ae7bc1957d84fa71f61aed73d20e9f69e04d16e /usr.bin
parent0528a668a5a4bb46c5ecebd791cd04216bdba0b2 (diff)
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/w/w.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index 6e006ad51bc66..e7cafcaacb7b1 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -72,7 +72,6 @@ static char sccsid[] = "@(#)w.c 8.4 (Berkeley) 4/16/94";
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <tzfile.h>
#include <unistd.h>
#include <utmp.h>
#include <vis.h>
@@ -371,11 +370,11 @@ pr_header(nowp, nusers)
boottime.tv_sec != 0) {
uptime = now - boottime.tv_sec;
uptime += 30;
- days = uptime / SECSPERDAY;
- uptime %= SECSPERDAY;
- hrs = uptime / SECSPERHOUR;
- uptime %= SECSPERHOUR;
- mins = uptime / SECSPERMIN;
+ days = uptime / 86400;
+ uptime %= 86400;
+ hrs = uptime / 3600;
+ uptime %= 3600;
+ mins = uptime / 60;
(void)printf(" up");
if (days > 0)
(void)printf(" %d day%s,", days, days > 1 ? "s" : "");