diff options
author | Adam Saponara <as@php.net> | 2020-10-30 21:56:16 -0400 |
---|---|---|
committer | Adam Saponara <as@php.net> | 2020-10-30 21:56:16 -0400 |
commit | dde71c6637905e1707bd1020c93e930f4b0a480b (patch) | |
tree | ef65023b640f292ac50a7e0db38babbb78ef8eea /Process.h | |
parent | bbf01054bf943db4394027d77915f9625ebde81e (diff) |
Highlight new and old processes (#74)
Diffstat (limited to 'Process.h')
-rw-r--r-- | Process.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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); |