projects
/
monky
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
no behavior change, just change the % calc math so the type conversion and operation...
[monky]
/
src
/
top.c
diff --git
a/src/top.c
b/src/top.c
index
26350eb
..
e35b1ad
100644
(file)
--- a/
src/top.c
+++ b/
src/top.c
@@
-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;*/