From 44753a9e39bb081a76c5b5cf53a25460d1f0e533 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 26 Aug 2021 01:01:01 -0700 Subject: vmon: track start time Preparatory commit; PNG snapshots will be named using the start time --- src/vmon.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/vmon.c') 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 #include #include +#include #include #include #include @@ -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; -- cgit v1.2.3