summaryrefslogtreecommitdiff
path: root/src/print_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/print_time.c')
-rw-r--r--src/print_time.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/print_time.c b/src/print_time.c
index 2cf2ab3..9c9df90 100644
--- a/src/print_time.c
+++ b/src/print_time.c
@@ -3,14 +3,9 @@
#include <stdio.h>
#include <stdlib.h>
-void print_time(const char *format) {
+void print_time(const char *format, struct tm *current_tm) {
static char part[512];
/* Get date & time */
- time_t current_time = time(NULL);
- if (current_time == (time_t) -1) {
- return;
- }
- struct tm *current_tm = localtime(&current_time);
if (current_tm == NULL) {
return;
}