summaryrefslogtreecommitdiffstats
path: root/SwapMeter.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-01-21 23:27:31 -0200
committerHisham Muhammad <hisham@gobolinux.org>2015-01-21 23:27:31 -0200
commit3383d8e5561dfc6fb2b65e0a194df94ccb5e08af (patch)
treedafba704561386b31b6b8af6dafb5b9a2ba7453c /SwapMeter.c
parent36b78328843d0dae0d0fadbd0e814a8a1546327c (diff)
Sorry about the mega-patch.
This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.)
Diffstat (limited to 'SwapMeter.c')
-rw-r--r--SwapMeter.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/SwapMeter.c b/SwapMeter.c
index 2cb86d5e..b8bb1814 100644
--- a/SwapMeter.c
+++ b/SwapMeter.c
@@ -8,7 +8,7 @@ in the source distribution for its full text.
#include "SwapMeter.h"
#include "CRT.h"
-#include "ProcessList.h"
+#include "Platform.h"
#include <stdlib.h>
#include <string.h>
@@ -34,11 +34,8 @@ static void SwapMeter_humanNumber(char* buffer, const long int* value) {
}
static void SwapMeter_setValues(Meter* this, char* buffer, int len) {
- long int usedSwap = this->pl->usedSwap;
- this->total = this->pl->totalSwap;
- this->values[0] = usedSwap;
-
- snprintf(buffer, len, "%ld/%ldMB", (long int) usedSwap / MEGABYTE, (long int) this->total / MEGABYTE);
+ Platform_setSwapValues(this);
+ snprintf(buffer, len, "%ld/%ldMB", (long int) this->values[0] / MEGABYTE, (long int) this->total / MEGABYTE);
}
static void SwapMeter_display(Object* cast, RichString* out) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy