diff options
| author | Maciej Borowiec <81316152+Mosder@users.noreply.github.com> | 2026-06-14 01:54:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-14 01:54:07 +0200 |
| commit | 2e3f7fe39791cd671a68330f7ba7a5bb5fc6f9ae (patch) | |
| tree | bf2f679387bff19637e1183400c0b0290d2d1834 /analyzer/utils/time.c | |
| parent | 35dc15a03ba5cf2dec10d63a1fdc7ab1fb082899 (diff) | |
| parent | c2568d72efca8fae3c610072cb055f9c8de3ca5f (diff) | |
Merge pull request #4 from Mosder/2-simple-capturing-mode
Simple capturing mode
Diffstat (limited to 'analyzer/utils/time.c')
| -rw-r--r-- | analyzer/utils/time.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/analyzer/utils/time.c b/analyzer/utils/time.c new file mode 100644 index 0000000..72c0bc7 --- /dev/null +++ b/analyzer/utils/time.c @@ -0,0 +1,10 @@ +#include "time.h" + +#include <stdio.h> +#include <time.h> + +void get_date_time_string(char *date_time) { + time_t now = time(NULL); + struct tm *t = localtime(&now); + sprintf(date_time, "%02d%02d%02d_%02d%02d%02d", t->tm_year - 100, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, t->tm_sec); +} |
