|
Line 49
Link Here
|
|
|
49 |
#include <sys/timeb.h> |
|
Line 446
Link Here
|
| 446 |
snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf); |
447 |
struct timeb tb; |
| 447 |
-- |
448 |
struct tm tm; |
|
|
449 |
char *p= msgbuf; |
| 450 |
|
| 451 |
ftime (&tb); |
| 452 |
localtime_r (&tb.time, &tm); |
| 453 |
p += strftime (p, 16, "%Y%m%d.%H%M%S", &tm); |
| 454 |
p += sprintf (p, ".%03d ", tb.millitm); |
| 455 |
snprintf(p, (msgbuf + sizeof msgbuf - p), "%s\r\n", fmtbuf); |