Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
655c29bc
Commit
655c29bc
authored
Jun 30, 2010
by
Hisham Muhammad
Browse files
Fix display of nan% in CPU meters
(Fix by Steven Hampson)
parent
65bc58ed
Changes
2
Show whitespace changes
Inline
Side-by-side
CPUMeter.c
View file @
655c29bc
...
...
@@ -47,7 +47,7 @@ static void CPUMeter_setValues(Meter* this, char* buffer, int size) {
snprintf
(
buffer
,
size
,
"absent"
);
return
;
}
double
total
=
(
double
)
pl
->
totalPeriod
[
processor
];
double
total
=
(
double
)
(
pl
->
totalPeriod
[
processor
]
==
0
?
1
:
pl
->
totalPeriod
[
processor
])
;
double
cpu
;
this
->
values
[
0
]
=
pl
->
nicePeriod
[
processor
]
/
total
*
100
.
0
;
this
->
values
[
1
]
=
pl
->
userPeriod
[
processor
]
/
total
*
100
.
0
;
...
...
ChangeLog
View file @
655c29bc
...
...
@@ -9,6 +9,8 @@ What's new in version 0.8.4
(thanks to Tom Callaway)
* getopt-based long options and --no-color
(thanks to Vincent Launchbury)
* BUGFIX: Fix display of nan% in CPU meters
(thanks to Steven Hampson)
* BUGFIX: Fix memory leak
(thanks to Pavol Rusnak)
* Add Bash/emacs style navigation keys
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment