aboutsummaryrefslogtreecommitdiffstats
path: root/NetworkIOMeter.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2022-02-04 11:23:04 +0100
committerDaniel Lange <DLange@git.local>2022-02-04 11:23:04 +0100
commit93c96b12c9cb349b762d38d69568d65cd3e4fbfd (patch)
tree9cb12bb8f6c16c23cbb19df65c2334449693187d /NetworkIOMeter.c
parentebf0c067a1fdd4b4779b9557552c2278755dcab4 (diff)
parenta6822e98434cf7da6fab033898094976d881ee0f (diff)
downloaddebian_htop-93c96b12c9cb349b762d38d69568d65cd3e4fbfd.tar.gz
debian_htop-93c96b12c9cb349b762d38d69568d65cd3e4fbfd.tar.bz2
debian_htop-93c96b12c9cb349b762d38d69568d65cd3e4fbfd.zip
Update upstream source from tag 'upstream/3.1.2'
Update to upstream version '3.1.2' with Debian dir 5ce130e9471b77941bbd217b5ea8b7b3419a91c6
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