Skip to content

Commit 642ba73

Browse files
author
Yuuki Harano
committed
usec output by PGTK_TRACE.
1 parent 2fe3355 commit 642ba73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pgtkfns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3176,7 +3176,7 @@ void pgtk_log(const char *file, int lineno, const char *fmt, ...)
31763176
localtime_r(&ts.tv_sec, &tm);
31773177
strftime(timestr, sizeof timestr, "%H:%M:%S", &tm);
31783178

3179-
fprintf(stderr, "%s %.10s:%04d ", timestr, file, lineno);
3179+
fprintf(stderr, "%s.%06ld %.10s:%04d ", timestr, ts.tv_nsec / 1000, file, lineno);
31803180
va_start(ap, fmt);
31813181
vfprintf(stderr, fmt, ap);
31823182
va_end(ap);
@@ -3198,7 +3198,7 @@ void pgtk_backtrace(const char *file, int lineno)
31983198
localtime_r(&ts.tv_sec, &tm);
31993199
strftime(timestr, sizeof timestr, "%H:%M:%S", &tm);
32003200

3201-
fprintf(stderr, "%s %.10s:%04d ********\n", timestr, file, lineno);
3201+
fprintf(stderr, "%s.%06ld %.10s:%04d ********\n", timestr, ts.tv_nsec / 1000, file, lineno);
32023202

32033203
get_backtrace(bt);
32043204
for (int i = 0; i < 10; i++) {

0 commit comments

Comments
 (0)