diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-11-23 03:46:43 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-11-23 03:46:43 -0200 |
commit | d34645f8f1b958454f182fcc061a05fefe48f4df (patch) | |
tree | c2e19bf9788090af9f4d92619f1827ff203f60fd /LoadAverageMeter.c | |
parent | f02d8f43869be3fc2c14b817af50c2d14da75c98 (diff) |
Array entries have been oddly flipped here for years.
Diffstat (limited to 'LoadAverageMeter.c')
-rw-r--r-- | LoadAverageMeter.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/LoadAverageMeter.c b/LoadAverageMeter.c index 23645dda..d292a7cb 100644 --- a/LoadAverageMeter.c +++ b/LoadAverageMeter.c @@ -15,25 +15,25 @@ in the source distribution for its full text. }*/ int LoadAverageMeter_attributes[] = { - LOAD_AVERAGE_FIFTEEN, LOAD_AVERAGE_FIVE, LOAD_AVERAGE_ONE + LOAD_AVERAGE_ONE, LOAD_AVERAGE_FIVE, LOAD_AVERAGE_FIFTEEN }; int LoadMeter_attributes[] = { LOAD }; static void LoadAverageMeter_setValues(Meter* this, char* buffer, int size) { - Platform_getLoadAverage(&this->values[2], &this->values[1], &this->values[0]); - snprintf(buffer, size, "%.2f/%.2f/%.2f", this->values[2], this->values[1], this->values[0]); + Platform_getLoadAverage(&this->values[0], &this->values[1], &this->values[2]); + snprintf(buffer, size, "%.2f/%.2f/%.2f", this->values[0], this->values[1], this->values[2]); } static void LoadAverageMeter_display(Object* cast, RichString* out) { Meter* this = (Meter*)cast; char buffer[20]; - sprintf(buffer, "%.2f ", this->values[2]); - RichString_write(out, CRT_colors[LOAD_AVERAGE_FIFTEEN], buffer); + sprintf(buffer, "%.2f ", this->values[0]); + RichString_write(out, CRT_colors[LOAD_AVERAGE_ONE], buffer); sprintf(buffer, "%.2f ", this->values[1]); RichString_append(out, CRT_colors[LOAD_AVERAGE_FIVE], buffer); - sprintf(buffer, "%.2f ", this->values[0]); - RichString_append(out, CRT_colors[LOAD_AVERAGE_ONE], buffer); + sprintf(buffer, "%.2f ", this->values[2]); + RichString_append(out, CRT_colors[LOAD_AVERAGE_FIFTEEN], buffer); } static void LoadMeter_setValues(Meter* this, char* buffer, int size) { |