aboutsummaryrefslogtreecommitdiffstats
path: root/DiskIOMeter.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 /DiskIOMeter.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 'DiskIOMeter.c')
-rw-r--r--DiskIOMeter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/DiskIOMeter.c b/DiskIOMeter.c
index c5f1476..11fb791 100644
--- a/DiskIOMeter.c
+++ b/DiskIOMeter.c
@@ -81,6 +81,12 @@ static void DiskIOMeter_updateValues(Meter* this) {
cached_msTimeSpend_total = data.totalMsTimeSpend;
}
+ 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_utilisation_diff;
this->total = MAXIMUM(this->values[0], 100.0); /* fix total after (initial) spike */

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