Qt计算两个时间差

时间:2017-06-21 13:32:13   收藏:0   阅读:2482
 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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!