summaryrefslogtreecommitdiff
path: root/bin/ps/print.c
diff options
context:
space:
mode:
authorcvs2svn <cvs2svn@FreeBSD.org>1999-01-21 00:55:32 +0000
committercvs2svn <cvs2svn@FreeBSD.org>1999-01-21 00:55:32 +0000
commit76b5366091f76c9bc73570149ef5055648fc2c39 (patch)
tree590d020e0f2a5bea6e09d66d951a674443b21d67 /bin/ps/print.c
parent4b4d01da6f07f7754ff6a6e4f5223e9f0984d1a6 (diff)
Notes
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r--bin/ps/print.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 9317c7be1ffc2..09fbf8e342ccb 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -36,7 +36,7 @@
static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
#endif
static const char rcsid[] =
- "$Id: print.c,v 1.32 1998/09/14 08:32:20 dfr Exp $";
+ "$Id: print.c,v 1.31 1998/06/28 21:05:48 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -503,8 +503,8 @@ getpcpu(k)
if (p->p_swtime == 0 || (p->p_flag & P_INMEM) == 0)
return (0.0);
if (rawcpu)
- return (100.0 * fxtofl(p->p_pctcpu));
- return (100.0 * fxtofl(p->p_pctcpu) /
+ return (10000.0 / sysconf(_SC_CLK_TCK) * fxtofl(p->p_pctcpu));
+ return (10000.0 / sysconf(_SC_CLK_TCK) * fxtofl(p->p_pctcpu) /
(1.0 - exp(p->p_swtime * log(fxtofl(ccpu)))));
}