Commit b63a740b authored by Eli Zaretskii's avatar Eli Zaretskii

(procfs_system_process_attributes): Multiply `pcpu' by 100, so it's in

percents as advertised.
parent 60aff924
2008-10-02 Eli Zaretskii <eliz@gnu.org>
* process.c (procfs_system_process_attributes): Multiply `pcpu' by
100, so it's in percents as advertised.
2008-10-02 Adrian Robert <Adrian.B.Robert@gmail.com>
* nsterm.h (ns_cursor_types, ns_output.desired_cursor_color)
......
......@@ -7404,7 +7404,9 @@ procfs_system_process_attributes (pid)
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment