summaryrefslogtreecommitdiffstats
path: root/usr.bin/ruptime
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-08-07 19:17:46 +0000
committerwollman <wollman@FreeBSD.org>1995-08-07 19:17:46 +0000
commitfc1f6c1d76677a4e8d2c39e5fa7be3716841930e (patch)
tree413738746625eee30af858d100ea794582067fa4 /usr.bin/ruptime
parentc87e4ea046fafb0b07c7ac3335948b0743fed8b4 (diff)
downloadFreeBSD-src-fc1f6c1d76677a4e8d2c39e5fa7be3716841930e.zip
FreeBSD-src-fc1f6c1d76677a4e8d2c39e5fa7be3716841930e.tar.gz
Delete bogus referneces to timezone code internal header file `tzfile.h',
which is no longer bogusly installed in /usr/include.
Diffstat (limited to 'usr.bin/ruptime')
-rw-r--r--usr.bin/ruptime/ruptime.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.bin/ruptime/ruptime.c b/usr.bin/ruptime/ruptime.c
index 24e2021..ba8cda5 100644
--- a/usr.bin/ruptime/ruptime.c
+++ b/usr.bin/ruptime/ruptime.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-/* $Id$ */
+/* $Id: ruptime.c,v 1.4 1995/07/22 22:28:31 joerg Exp $ */
#ifndef lint
static char copyright[] =
@@ -55,7 +55,6 @@ static char sccsid[] = "@(#)ruptime.c 8.2 (Berkeley) 4/5/94";
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include <tzfile.h>
#include <unistd.h>
struct hs {
@@ -203,11 +202,11 @@ interval(tval, updown)
return (resbuf);
}
/* round to minutes. */
- minutes = (tval + (SECSPERMIN - 1)) / SECSPERMIN;
- hours = minutes / MINSPERHOUR;
- minutes %= MINSPERHOUR;
- days = hours / HOURSPERDAY;
- hours %= HOURSPERDAY;
+ minutes = (tval + (60 - 1)) / 60;
+ hours = minutes / 60;
+ minutes %= 60;
+ days = hours / 24;
+ hours %= 24;
if (days)
(void)snprintf(resbuf, sizeof(resbuf),
"%s %2d+%02d:%02d", updown, days, hours, minutes);
OpenPOWER on IntegriCloud