1
0
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:
David Carter 2005-11-12 16:13:11 +00:00
parent 2b994a1ab9
commit b2ea953bee

View File

@ -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;*/