mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-24 23:58:35 +00:00
no behavior change, just change the % calc math so the type conversion and operation precedence is explicit
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@407 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
2b994a1ab9
commit
b2ea953bee
@ -387,7 +387,7 @@ inline static void calc_cpu_each(unsigned long total)
|
||||
(100.0 * (float) (p->user_time + p->kernel_time) /
|
||||
total) : 0; */
|
||||
p->amount =
|
||||
(100.0 * (p->user_time + p->kernel_time) / total);
|
||||
100.0 * ((float)(p->user_time + p->kernel_time) / (float)total);
|
||||
|
||||
/* if (p->amount > 100)
|
||||
p->amount = 0;*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user