Mercurial > emacs
diff src/process.c @ 98466:474444f05cb5
(procfs_system_process_attributes): Multiply `pcpu' by 100, so it's in
percents as advertised.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Thu, 02 Oct 2008 20:03:05 +0000 |
parents | a68b7a895cb6 |
children | 44b480d7a129 |
line wrap: on
line diff
--- a/src/process.c Thu Oct 02 17:32:40 2008 +0000 +++ b/src/process.c Thu Oct 02 20:03:05 2008 +0000 @@ -7404,7 +7404,9 @@ attrs); time_from_jiffies (utime + stime, clocks_per_sec, &sec, &usec); pcpu = (sec + usec / 1000000.0) / (EMACS_SECS (telapsed) + EMACS_USECS (telapsed) / 1000000.0); - attrs = Fcons (Fcons (Qpcpu, make_float (pcpu)), attrs); + if (pcpu > 1.0) + pcpu = 1.0; + attrs = Fcons (Fcons (Qpcpu, make_float (100 * pcpu)), attrs); pmem = 4.0 * 100 * rss / procfs_get_total_memory (); if (pmem > 100) pmem = 100;