1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Timers: Parse and format functions for microsecond times

Date/time output (e.g. in logs, show commands) can use %f to specify
subsecond time. By default, millisecond precision is used in output.
This commit is contained in:
Ondrej Zajicek (work)
2017-06-06 16:47:30 +02:00
parent 025525266f
commit f047271cb9
21 changed files with 244 additions and 193 deletions

View File

@@ -120,7 +120,7 @@ log_commit(int class, buffer *buf)
else
{
byte tbuf[TM_DATETIME_BUFFER_SIZE];
tm_format_datetime(tbuf, &config->tf_log, now);
tm_format_real_time(tbuf, config->tf_log.fmt1, current_real_time());
fprintf(l->fh, "%s <%s> ", tbuf, class_names[class]);
}
fputs(buf->start, l->fh);