测试使用高精度cpu时间计算这三者的具体延时,测出结果如下:
usleep(1)精度:

usleep(1000)精度:相差近2000us

msleep(1)精度:相差近0.8ms

sleep(1)精度:还是算精确吧

测试使用高精度cpu时间计算这三者的具体延时,测出结果如下:
usleep(1)精度:
usleep(1000)精度:相差近2000us
本文标题:qt 中sleep,usleep,msleep时间研究
本文链接:https://www.haomeiwen.com/subject/gwlhsftx.html
网友评论