summaryrefslogtreecommitdiffstats
path: root/Process.h
diff options
context:
space:
mode:
authorAdam Saponara <as@php.net>2020-10-30 21:56:16 -0400
committerAdam Saponara <as@php.net>2020-10-30 21:56:16 -0400
commitdde71c6637905e1707bd1020c93e930f4b0a480b (patch)
treeef65023b640f292ac50a7e0db38babbb78ef8eea /Process.h
parentbbf01054bf943db4394027d77915f9625ebde81e (diff)
Highlight new and old processes (#74)
Diffstat (limited to 'Process.h')
-rw-r--r--Process.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/Process.h b/Process.h
index b2c82080..e3ff333f 100644
--- a/Process.h
+++ b/Process.h
@@ -10,17 +10,18 @@ in the source distribution for its full text.
#include <stdbool.h>
#include <sys/types.h>
+#include <time.h>
#include "Object.h"
#include "RichString.h"
-
#ifdef __ANDROID__
#define SYS_ioprio_get __NR_ioprio_get
#define SYS_ioprio_set __NR_ioprio_set
#endif
#define PROCESS_FLAG_IO 0x0001
+#define DEFAULT_HIGHLIGHT_SECS 5
typedef enum ProcessFields {
NULL_PROCESSFIELD = 0,
@@ -59,6 +60,7 @@ struct Settings_;
typedef struct Process_ {
Object super;
+ const struct ProcessList_* processList;
const struct Settings_* settings;
unsigned long long int time;
@@ -99,6 +101,9 @@ typedef struct Process_ {
int exit_signal;
+ time_t seenTs;
+ time_t tombTs;
+
unsigned long int minflt;
unsigned long int majflt;
} Process;
@@ -172,6 +177,10 @@ void Process_init(Process* this, const struct Settings_* settings);
void Process_toggleTag(Process* this);
+bool Process_isNew(const Process* this);
+
+bool Process_isTomb(const Process* this);
+
bool Process_setPriority(Process* this, int priority);
bool Process_changePriorityBy(Process* this, Arg delta);

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