summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2024-04-05 13:07:21 +0200
committercgzones <cgzones@googlemail.com>2024-04-05 19:07:06 +0200
commit5518652e711a636781414c2a232c4dff1d498904 (patch)
treea4122f5fb086f3b02da823050fd75151fdc87467
parent62c2d820add3dadea7569af051d2afd804f08432 (diff)
Fix regression from storing monotonic time deltas
When starting htop the timestamp of the first scan must be far in the past to avoid showing all processes as being started just recently. Fixes: b61685779cdf696ba4135a97ce66075c337c7562
-rw-r--r--Machine.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Machine.c b/Machine.c
index 6beb47b4..2c66571e 100644
--- a/Machine.c
+++ b/Machine.c
@@ -101,11 +101,12 @@ void Machine_scanTables(Machine* this) {
if (firstScanDone) {
this->prevMonotonicMs = this->monotonicMs;
+ Platform_gettime_monotonic(&this->monotonicMs);
} else {
this->prevMonotonicMs = 0;
+ this->monotonicMs = 1;
firstScanDone = true;
}
- Platform_gettime_monotonic(&this->monotonicMs);
assert(this->monotonicMs > this->prevMonotonicMs);
this->maxUserId = 0;

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