求某段程序运行时间

#include "qdatetime.h"
QDateTime time01 = QDateTime::currentDateTime();
{
	代码块
}
qDebug() << "运行时长: " << time01.msecsTo(QDateTime::currentDateTime());

你可能感兴趣的:(杂项)