diff options
Diffstat (limited to 'app/time_fn.c')
-rw-r--r-- | app/time_fn.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/time_fn.c b/app/time_fn.c index 5636ef1..1067dd9 100644 --- a/app/time_fn.c +++ b/app/time_fn.c @@ -210,16 +210,16 @@ EPOCH time_utc_to_epoch (UTC u) } -void time_print_utc (UTC u) +void time_print_utc (const char *p, UTC u) { const char *dname[] = {"Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat", "Sun"}; const char *mname[] = {"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; - printf ("%s %04d-%s-%02d %02d:%02d:%02d.%09d\r\n", dname[u.wday], u.year, mname[u.month], u.mday, u.hour, u.minute, u.second, u.nanosecond); + printf ("%s%s %04d-%s-%02d %02d:%02d:%02d.%09d\r\n", p ? p : "", dname[u.wday], u.year, mname[u.month], u.mday, u.hour, u.minute, u.second, u.nanosecond); } -void time_print_epoch (EPOCH e) +void time_print_epoch (const char *p, EPOCH e) { UTC u = time_epoch_to_utc (e); - time_print_utc (u); + time_print_utc (p, u); } |