- 886 名前:デフォルトの名無しさん mailto:sage [2018/10/23(火) 22:50:27.85 ID:PGQOpxAMa.net]
- >>856
サンプル書いてやったぞ #include <stdio.h> #include <time.h> #define D(fmt, ...) \ do { \ struct timespec _ts_; \ struct tm _tm_; \ char _tt_[128] = {0}; \ clock_gettime(CLOCK_REALTIME, &_ts_); \ localtime_r(&_ts_.tv_sec, &_tm_); \ strftime(_tt_, 128, "%H:%M:%S", &_tm_); \ fprintf(stdout, "\033[33m%s.%lu %s:%d %s " fmt "\033[0m\n", \ _tt_, _ts_.tv_nsec, __FILE__, __LINE__, __func__, ##__VA_ARGS__); \ } while (0);
|

|