Commit 3659c90
committed
CPUMeter: Improve spacing between sub-meter algorithm
The new algorithm will make the meter bars aligned when groups of CPU
meters with 2, 4 and 8 sub-columns are placed together in one larger
column. It utilizes the fact that the number of sub-columns of CPU
meters are in power of 2 only, and calculates spacing with bit tricks.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>1 parent 09de683 commit 3659c90
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
305 | | - | |
306 | | - | |
307 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
308 | 313 | | |
309 | 314 | | |
310 | 315 | | |
| |||
0 commit comments