From f757810f489b12d2a98dcb09751003f4ed002538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 20 Oct 2020 21:40:51 +0200 Subject: Improve handling of no data in Disk and Network IO Meters --- dragonflybsd/Platform.c | 8 ++++++-- dragonflybsd/Platform.h | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'dragonflybsd') diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c index b67ff8a1..f01749b7 100644 --- a/dragonflybsd/Platform.c +++ b/dragonflybsd/Platform.c @@ -206,12 +206,15 @@ 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) { // TODO *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) { @@ -220,4 +223,5 @@ void Platform_getNetworkIO(unsigned long int *bytesReceived, *packetsReceived = 0; *bytesTransmitted = 0; *packetsTransmitted = 0; + return false; } diff --git a/dragonflybsd/Platform.h b/dragonflybsd/Platform.h index 7f31f0a5..7ea211ca 100644 --- a/dragonflybsd/Platform.h +++ b/dragonflybsd/Platform.h @@ -40,9 +40,11 @@ void Platform_setSwapValues(Meter* 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); -- cgit v1.2.3