下面的代碼時用來打印在日誌的時間:捕捉毫秒
#define PRINTTIME() struct tm * tmptime;
time_t tmpGetTime;
time(&tmpGetTime);
tmptime = localtime(&tmpGetTime);
cout << tmptime->tm_mday << "/" <<tmptime->tm_mon+1 << "/" << 1900+tmptime->tm_year << " " << tmptime->tm_hour << ":" << tmptime->tm_min << ":" << tmptime->tm_sec<<">>";
有什麼辦法來毫秒添加到這個?
可能重複[如何獲得當前TI以毫秒爲單位mestamp自1970年以來就是這個樣子的Java得到(http://stackoverflow.com/questions/19555121/how-to-get-current-timestamp-in-milliseconds-since-1970-just-the-way-java-得到) – 2015-09-30 09:06:47