-#ifndef HOST_WIN32
-# define LOG_TIMESTAMP \
- do { \
- time_t t; \
- struct tm tod; \
- time(&t); \
- localtime_r(&t, &tod); \
- strftime(logTime, sizeof(logTime), "%Y-%m-%d %H:%M:%S", &tod); \
- } while (0)
-#else
-# define LOG_TIMESTAMP \
- do { \
- time_t t; \
- struct tm *tod; \
- time(&t); \
- tod = localtime(&t); \
- strftime(logTime, sizeof(logTime), "%F %T", tod); \
- } while (0)
-#endif