summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfadhil riyanto <me@fadev.org>2024-08-17 10:25:47 +0700
committerfadhil riyanto <me@fadev.org>2024-08-17 10:25:47 +0700
commit9720461319aed7add98a68c6f7b497737173b64a (patch)
tree4c087e74d2b8216624427abc23f61286ff9ea4f6
parent8a72937090af0fe256a440a362ea2df28df300f3 (diff)
generate time
Signed-off-by: fadhil riyanto <me@fadev.org>
-rw-r--r--init.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/init.c b/init.c
index 1dba0b4..8ecc0b8 100644
--- a/init.c
+++ b/init.c
@@ -1,4 +1,24 @@
+#include <time.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <pthread.h>
+#include <sys/epoll.h>
+
+#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