summaryrefslogtreecommitdiffstats
path: root/ProcessList.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-12-13 13:18:38 +0100
committerBenBE <BenBE@geshi.org>2020-12-18 22:43:21 +0100
commit27b8d81ed26098f9b7dd7e0feb5d8b11fdda4288 (patch)
treec3cd08f77988b1d0180fefce4a3255af7a7d4642 /ProcessList.c
parent26993d2d2b2be391adbfaa2ee53ee3e77f323b28 (diff)
ProcessList: save scan time in millisecond
The delay is saved in deciseconds, use a bigger resolution to avoid timing irregularities.
Diffstat (limited to 'ProcessList.c')
-rw-r--r--ProcessList.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ProcessList.c b/ProcessList.c
index b7800e49..ee09edc8 100644
--- a/ProcessList.c
+++ b/ProcessList.c
@@ -539,7 +539,9 @@ void ProcessList_scan(ProcessList* this, bool pauseProcessUpdate) {
this->scanTs = 0;
firstScanDone = true;
} else if (Compat_clock_monotonic_gettime(&now) == 0) {
- this->scanTs = now.tv_sec + now.tv_nsec / 1000000000;
+ // save time in millisecond, so with a delay in deciseconds
+ // there are no irregularities
+ this->scanTs = 1000 * now.tv_sec + now.tv_nsec / 1000000;
}
ProcessList_goThroughEntries(this, false);
@@ -555,7 +557,7 @@ void ProcessList_scan(ProcessList* this, bool pauseProcessUpdate) {
// process no longer exists
if (this->settings->highlightChanges && p->wasShown) {
// mark tombed
- p->tombTs = this->scanTs + this->settings->highlightDelaySecs;
+ p->tombTs = this->scanTs + 1000 * this->settings->highlightDelaySecs;
} else {
// immediately remove
ProcessList_remove(this, p);

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