summaryrefslogtreecommitdiff
path: root/usr.sbin/apmd
diff options
context:
space:
mode:
authorDavid Coppa <dcoppa@cvs.openbsd.org>2014-09-26 10:39:29 +0000
committerDavid Coppa <dcoppa@cvs.openbsd.org>2014-09-26 10:39:29 +0000
commit3e1e8923f74fb5c9c2287b74744e07f53497ff4f (patch)
tree2b73b5194d9e1df0555c74695a572abeae0c878e /usr.sbin/apmd
parent667b020992371068cb69eb5f4d6aba8941fbad35 (diff)
zap now unused "PERFINC"
restore original behavior of apmtimeout ok tedu@
Diffstat (limited to 'usr.sbin/apmd')
-rw-r--r--usr.sbin/apmd/apmd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c
index 57976d84fff..6954f44af63 100644
--- a/usr.sbin/apmd/apmd.c
+++ b/usr.sbin/apmd/apmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmd.c,v 1.68 2014/09/26 08:55:59 tedu Exp $ */
+/* $OpenBSD: apmd.c,v 1.69 2014/09/26 10:39:28 dcoppa Exp $ */
/*
* Copyright (c) 1995, 1996 John T. Kohl
@@ -61,7 +61,6 @@ const char sockfile[] = _PATH_APM_SOCKET;
int debug = 0;
int doperf = PERF_NONE;
-#define PERFINC 50
#define PERFDEC 20
#define PERFMIN 0
#define PERFMAX 100
@@ -643,9 +642,11 @@ main(int argc, char *argv[])
sts.tv_sec = 0;
sts.tv_nsec = 200000000;
perf_status(&pinfo, ncpu);
+ apmtimeout += 1;
+ } else {
+ apmtimeout += sts.tv_sec;
}
- apmtimeout += 1;
if ((rv = kevent(kq, NULL, 0, ev, 1, &sts)) < 0)
break;