Qt c++ 快速輸出當(dāng)前時(shí)間,精確到毫秒
直接上栗子了:
一行直通:
qDebug()<< QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz");
多行:
QTime current_time = QTime::currentTime();
int hour = current_time.hour(); //當(dāng)前的小時(shí)
int minute = current_time.minute(); //當(dāng)前的分int second = current_time.second(); //當(dāng)前的秒
int msec = current_time.msec(); //當(dāng)前的毫秒
--------------------
原文地址:https://soft.pbottle.com/a-13829.html