summaryrefslogtreecommitdiffstats
path: root/unsupported
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-10-20 21:40:51 +0200
committercgzones <cgzones@googlemail.com>2020-10-26 19:17:14 +0100
commitf757810f489b12d2a98dcb09751003f4ed002538 (patch)
tree4558520309803981d20d8c0aa6ab100211d9bd48 /unsupported
parent167adc0a2b4a940cae6c9eb71f3185b5d2d3b4fa (diff)
Improve handling of no data in Disk and Network IO Meters
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/Platform.c8
-rw-r--r--unsupported/Platform.h6
2 files changed, 10 insertions, 4 deletions
diff --git a/unsupported/Platform.c b/unsupported/Platform.c
index cc28fd8f..e2d7fa6b 100644
--- a/unsupported/Platform.c
+++ b/unsupported/Platform.c
@@ -141,11 +141,14 @@ char* Platform_getProcessEnv(pid_t pid) {
return NULL;
}
-void Platform_getDiskIO(unsigned long int *bytesRead, unsigned long int *bytesWrite, unsigned long int *msTimeSpend) {
+bool Platform_getDiskIO(unsigned long int *bytesRead,
+ unsigned long int *bytesWrite,
+ unsigned long int *msTimeSpend) {
*bytesRead = *bytesWrite = *msTimeSpend = 0;
+ return false;
}
-void Platform_getNetworkIO(unsigned long int *bytesReceived,
+bool Platform_getNetworkIO(unsigned long int *bytesReceived,
unsigned long int *packetsReceived,
unsigned long int *bytesTransmitted,
unsigned long int *packetsTransmitted) {
@@ -153,4 +156,5 @@ void Platform_getNetworkIO(unsigned long int *bytesReceived,
*packetsReceived = 0;
*bytesTransmitted = 0;
*packetsTransmitted = 0;
+ return false;
}
diff --git a/unsupported/Platform.h b/unsupported/Platform.h
index 1049919d..1558d66a 100644
--- a/unsupported/Platform.h
+++ b/unsupported/Platform.h
@@ -47,9 +47,11 @@ bool Process_isThread(const Process* this);
char* Platform_getProcessEnv(pid_t pid);
-void Platform_getDiskIO(unsigned long int *bytesRead, unsigned long int *bytesWrite, unsigned long int *msTimeSpend);
+bool Platform_getDiskIO(unsigned long int *bytesRead,
+ unsigned long int *bytesWrite,
+ unsigned long int *msTimeSpend);
-void Platform_getNetworkIO(unsigned long int *bytesReceived,
+bool Platform_getNetworkIO(unsigned long int *bytesReceived,
unsigned long int *packetsReceived,
unsigned long int *bytesTransmitted,
unsigned long int *packetsTransmitted);

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