Qt计算两个时间差

 QTime startTime = QTime::currentTime();
    QThread::msleep(SLEEP_TIME_MILL);
    QTime stopTime = QTime::currentTime();
    int elapsed = startTime.msecsTo(stopTime);
    qDebug()<<"QTime.currentTime ="<"ms";

 

转载于:https://www.cnblogs.com/coolbear/p/7058450.html

你可能感兴趣的:(Qt计算两个时间差)