标签:min bsp class printf ftime 日志 efi lse localtime
打印日志的时候需要细化到毫秒级别
time_t t = time(NULL); struct tm tm; #if defined(_WIN32) localtime_s(&tm, &t); #else tm = *localtime(&t); #endif struct timeb msec; ftime(&msec); printf("%.2d/%.2d %.2d:%.2d:%.2d.%03d\t%s\n", tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec, msec.millitm, "test string");
标签:min bsp class printf ftime 日志 efi lse localtime
原文地址:https://www.cnblogs.com/yuandaozhe/p/11719620.html