about summary refs log tree commit diff stats
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/util.c b/util.c
new file mode 100644
index 00000000..08737ee9
--- /dev/null
+++ b/util.c
@@ -0,0 +1,13 @@
+#include <time.h>
+
+void get_time(char *thetime)
+{
+    time_t rawtime;
+    struct tm *timeinfo;
+
+    time(&rawtime);
+    timeinfo = localtime(&rawtime);
+
+    strftime(thetime, 80, "%H:%M", timeinfo);
+}
+