aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/top
diff options
context:
space:
mode:
authorWolfram Schneider <wosch@FreeBSD.org>1998-07-27 12:21:58 +0000
committerWolfram Schneider <wosch@FreeBSD.org>1998-07-27 12:21:58 +0000
commit4dc0ec1db14acde1f41bdf689f831a5e13dd803d (patch)
tree4ac8e5f7def9d62dca51a0642dcd6bf592f4dab6 /usr.bin/top
parenta0f5e52d4339c81d3f3bcbf1e533364dc9f18691 (diff)
downloadsrc-4dc0ec1db14acde1f41bdf689f831a5e13dd803d.tar.gz
src-4dc0ec1db14acde1f41bdf689f831a5e13dd803d.zip
Round - not cut - the real cpu time.
Notes
Notes: svn path=/head/; revision=37885
Diffstat (limited to 'usr.bin/top')
-rw-r--r--usr.bin/top/machine.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index dba333b7d34f..7d22e25c425c 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -17,7 +17,7 @@
* Steven Wallace <swallace@freebsd.org>
* Wolfram Schneider <wosch@FreeBSD.org>
*
- * $Id: machine.c,v 1.10 1998/05/28 09:29:48 phk Exp $
+ * $Id: machine.c,v 1.11 1998/06/21 18:00:34 dt Exp $
*/
@@ -565,7 +565,8 @@ char *(*get_userid)();
/* This does not produce the correct results */
cputime = PP(pp, p_uticks) + PP(pp, p_sticks) + PP(pp, p_iticks);
#endif
- cputime = PP(pp, p_runtime) / 1000000; /* This does not count interrupts */
+ /* This does not count interrupts */
+ cputime = (PP(pp, p_runtime) / 1000 + 500) / 1000;
/* calculate the base for cpu percentages */
pct = pctdouble(PP(pp, p_pctcpu));