Skip to content

Commit

Permalink
Changed MemoryMeter and SwapMeter to use short memory sizes
Browse files Browse the repository at this point in the history
The MemoryMeter and SwapMeter now use the short GNU Coreutils style
format to represent memory sizes.
  • Loading branch information
EliteTK committed Jun 8, 2015
1 parent abe165f commit 16d8cc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MemoryMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int MemoryMeter_attributes[] = {

static void MemoryMeter_setValues(Meter* this, char* buffer, int size) {
Platform_setMemoryValues(this);
snprintf(buffer, size, "%ld/%ldMB", (long int) this->values[0] / 1024, (long int) this->total / 1024);
snprintf(buffer, size, "%ld/%ldM", (long int) this->values[0] / 1024, (long int) this->total / 1024);
}

static void MemoryMeter_display(Object* cast, RichString* out) {
Expand Down
2 changes: 1 addition & 1 deletion SwapMeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void SwapMeter_humanNumber(char* buffer, const long int* value) {

static void SwapMeter_setValues(Meter* this, char* buffer, int len) {
Platform_setSwapValues(this);
snprintf(buffer, len, "%ld/%ldMB", (long int) this->values[0] / MEGABYTE, (long int) this->total / MEGABYTE);
snprintf(buffer, len, "%ld/%ldM", (long int) this->values[0] / MEGABYTE, (long int) this->total / MEGABYTE);
}

static void SwapMeter_display(Object* cast, RichString* out) {
Expand Down

0 comments on commit 16d8cc7

Please sign in to comment.