aboutsummaryrefslogtreecommitdiffstats
path: root/NetworkIOMeter.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2022-02-04 11:23:02 +0100
committerDaniel Lange <DLange@git.local>2022-02-04 11:23:02 +0100
commita6822e98434cf7da6fab033898094976d881ee0f (patch)
tree2b0f2ac3ad8c9e9a8c01bb692d9bdb51ce91e83b /NetworkIOMeter.c
parent30ce3b4c264c51c98f280e88e23792ff7deb2317 (diff)
downloaddebian_htop-a6822e98434cf7da6fab033898094976d881ee0f.tar.gz
debian_htop-a6822e98434cf7da6fab033898094976d881ee0f.tar.bz2
debian_htop-a6822e98434cf7da6fab033898094976d881ee0f.zip
New upstream version 3.1.2upstream/3.1.2
Diffstat (limited to 'NetworkIOMeter.c')
-rw-r--r--NetworkIOMeter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/NetworkIOMeter.c b/NetworkIOMeter.c
index dcba78d..6c429c3 100644
--- a/NetworkIOMeter.c
+++ b/NetworkIOMeter.c
@@ -85,6 +85,12 @@ static void NetworkIOMeter_updateValues(Meter* this) {
cached_txp_total = data.packetsTransmitted;
}
+ if (passedTimeInMs > 30000) {
+ // Triggers for the first initialization and
+ // when there was a long time we did not collect updates
+ hasData = false;
+ }
+
this->values[0] = cached_rxb_diff;
this->values[1] = cached_txb_diff;
if (cached_rxb_diff + cached_txb_diff > this->total) {

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