getdatetimestr

下午写了这么一个函数 char* getdatetimestr() { static char datetimestr[32] = {0}; static time_t last_update_time = 0; struct timeval tv = {0}; gettimeofday(&tv, NULL); time_t nowtime = tv.tv_sec; if (nowtime != last_update_time) { last_update_time = now……

阅读全文