Perform RichString operations by hand.

Avoid unnecessary operations when processing entries on ProcessList.
This commit is contained in:
Hisham Muhammad
2006-07-12 01:16:03 +00:00
parent e46f1426b9
commit dbe2670b69
13 changed files with 64 additions and 92 deletions

View File

@ -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);