aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-07-31 11:49:46 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2025-07-31 11:49:46 +0530
commiteb5c24d7316e497fb3f11a317f9d9ec508262507 (patch)
treea77862dda967a102c26be191802d2b69129f5e29 /src
parent14536c0da07233a7a4deddf8c73305ce918af3a7 (diff)
msg: print generation start time
Diffstat (limited to 'src')
-rw-r--r--src/msg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/msg.c b/src/msg.c
index 65f4293..66e19df 100644
--- a/src/msg.c
+++ b/src/msg.c
@@ -34,6 +34,7 @@
#include <string.h>
#include <sys/stat.h>
#include <template.h>
+#include <time.h>
#include <util.h>
extern msg_t *msg;
@@ -113,6 +114,12 @@ handle_file(const char *path)
int
run(void)
{
+ time_t rawtime;
+ struct tm *timeinfo;
+
+ time(&rawtime);
+ timeinfo = localtime(&rawtime);
+ printf("Generation started at: %s", asctime(timeinfo));
struct stat sb;
if (stat(msg->base_directory, &sb) != 0 || !S_ISDIR(sb.st_mode)) {
printf("%s does not exist.\n", msg->base_directory);