diff options
author | Benny Baumann <BenBE@geshi.org> | 2024-04-05 13:07:21 +0200 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2024-04-05 19:07:06 +0200 |
commit | 5518652e711a636781414c2a232c4dff1d498904 (patch) | |
tree | a4122f5fb086f3b02da823050fd75151fdc87467 /Machine.c | |
parent | 62c2d820add3dadea7569af051d2afd804f08432 (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
Diffstat (limited to 'Machine.c')
-rw-r--r-- | Machine.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |