summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-08-26 01:01:01 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-08-26 01:01:01 -0700
commit44753a9e39bb081a76c5b5cf53a25460d1f0e533 (patch)
treee2bba84d200cd3fc7883ed7e855b893197fa4bf6 /src
parent5620c44220153ff1512dc0edbbccab0cbbc4b5be (diff)
vmon: track start time
Preparatory commit; PNG snapshots will be named using the start time
Diffstat (limited to 'src')
-rw-r--r--src/vmon.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vmon.c b/src/vmon.c
index 2c04842..8c7cb28 100644
--- a/src/vmon.c
+++ b/src/vmon.c
@@ -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;
© All Rights Reserved