diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2021-08-26 01:01:01 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2021-08-26 01:01:01 -0700 |
commit | 44753a9e39bb081a76c5b5cf53a25460d1f0e533 (patch) | |
tree | e2bba84d200cd3fc7883ed7e855b893197fa4bf6 | |
parent | 5620c44220153ff1512dc0edbbccab0cbbc4b5be (diff) |
vmon: track start time
Preparatory commit; PNG snapshots will be named using the start time
-rw-r--r-- | src/vmon.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -23,6 +23,7 @@ #include <signal.h> #include <stdlib.h> #include <sys/prctl.h> +#include <time.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> @@ -45,6 +46,7 @@ typedef struct vmon_t { int pid; int done; int linger; + time_t start_time; } vmon_t; @@ -302,6 +304,7 @@ static vmon_t * vmon_startup(int argc, char * const argv[]) goto _err; } + vmon->start_time = time(NULL); vmon->width = WIDTH_DEFAULT; vmon->height = HEIGHT_DEFAULT; |