blob: 9c9df901319ca3e9d69bfc14e69a5c8432d4c522 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
// vim:ts=8:expandtab
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
void print_time(const char *format, struct tm *current_tm) {
static char part[512];
/* Get date & time */
if (current_tm == NULL) {
return;
}
(void)strftime(part, sizeof(part), format, current_tm);
printf("%s", part);
}
|