summaryrefslogtreecommitdiffstats
path: root/ProcessList.h
diff options
context:
space:
mode:
authorSohaib <sohaib.amhmd@gmail.com>2021-03-23 08:27:05 +0200
committerSohaib <sohaib.amhmd@gmail.com>2021-04-05 23:40:41 +0200
commit421bdeec603b4fb1a4edec0e802c437fbe47fca0 (patch)
tree8be7cfd1cb7b0c3d1720d75978b27318fbc43253 /ProcessList.h
parentf16aa483dd36cfdb39e9d6d4238687178f2981e8 (diff)
Merging all the points related to calculating time in one place
The end goal is to consolidate all the points in htop that can only work in live-only mode today, so that will be able to inject PCP archive mode and have a chance at it working. The biggest problem we've got at this moment is all the places that are independently asking the kernel to 'give me the time right now'. Each of those needs to be audited and ultimately changed to allow platforms to manage their own idea of time. So, all the calls to gettimeofday(2) and time(2) are potential problems. Ultimately I want to get these down to just one or two. Related to https://github.com/htop-dev/htop/pull/574
Diffstat (limited to 'ProcessList.h')
-rw-r--r--ProcessList.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/ProcessList.h b/ProcessList.h
index 3d9b8ff2..46944dbd 100644
--- a/ProcessList.h
+++ b/ProcessList.h
@@ -48,6 +48,9 @@ typedef struct ProcessList_ {
Hashtable* displayTreeSet;
Hashtable* draftingTreeSet;
+ struct timeval timestamp; /* time of the current sample */
+ uint64_t timestampMs; /* current time in milliseconds */
+
Panel* panel;
int following;
uid_t userId;

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