diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-31 11:49:46 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-31 11:49:46 +0530 |
commit | eb5c24d7316e497fb3f11a317f9d9ec508262507 (patch) | |
tree | a77862dda967a102c26be191802d2b69129f5e29 /src/msg.c | |
parent | 14536c0da07233a7a4deddf8c73305ce918af3a7 (diff) |
msg: print generation start time
Diffstat (limited to 'src/msg.c')
-rw-r--r-- | src/msg.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); |