mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-14 04:54:37 +03:00
Perform RichString operations by hand.
Avoid unnecessary operations when processing entries on ProcessList.
This commit is contained in:
@ -81,7 +81,7 @@ void CPUMeter_setValues(Meter* this, char* buffer, int size) {
|
||||
void CPUMeter_display(Object* cast, RichString* out) {
|
||||
char buffer[50];
|
||||
Meter* this = (Meter*)cast;
|
||||
RichString_prune(out);
|
||||
RichString_init(out);
|
||||
sprintf(buffer, "%5.1f%% ", this->values[1]);
|
||||
RichString_append(out, CRT_colors[METER_TEXT], ":");
|
||||
RichString_append(out, CRT_colors[CPU_NORMAL], buffer);
|
||||
|
Reference in New Issue
Block a user