获取当前时间点(C)
static void Get_Now_Time(std::string &outname)
{
char buf[256]="";
struct tm* date_time;
time_t now;
time(&now);
date_time = localtime(&now);
strftime(buf, sizeof(buf)/sizeof(buf[0]), "%Y%m%d_%H%M%S", date_time);
outname = std::string(buf);
return;
}
评论已关闭