]> git.sur5r.net Git - i3/i3status/blob - src/print_time.c
manpage: remove the obsolete i3bar -d invocation
[i3/i3status] / src / print_time.c
1 // vim:ts=8:expandtab
2 #include <time.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5
6 void print_time(const char *format, struct tm *current_tm) {
7         static char part[512];
8         /* Get date & time */
9         if (current_tm == NULL) {
10                 return;
11         }
12         (void)strftime(part, sizeof(part), format, current_tm);
13         printf("%s", part);
14 }