QTime startTime = QTime::currentTime(); QThread::msleep(SLEEP_TIME_MILL); QTime stopTime = QTime::currentTime(); int elapsed = startTime.msecsTo(stopTime); qDebug()<<"QTime.currentTime ="<<elapsed<<"ms";
原文:http://www.cnblogs.com/coolbear/p/7058450.html