From 9720461319aed7add98a68c6f7b497737173b64a Mon Sep 17 00:00:00 2001 From: fadhil riyanto Date: Sat, 17 Aug 2024 10:25:47 +0700 Subject: generate time Signed-off-by: fadhil riyanto --- init.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/init.c b/init.c index 1dba0b4..8ecc0b8 100644 --- a/init.c +++ b/init.c @@ -1,4 +1,24 @@ +#include +#include +#include +#include +#include + +#define debug(x) printf("%s\n", x) + +static char* get_time() +{ + time_t rawtime; + struct tm * timeinfo; + + time (&rawtime); + timeinfo = localtime(&rawtime); + + return asctime(timeinfo) +} + int main(void) { + get_time(); return 0; } \ No newline at end of file -- cgit v1.2.3