博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
QTimer
阅读量:7231 次
发布时间:2019-06-29

本文共 1085 字,大约阅读时间需要 3 分钟。

QTimer Class Reference

In multithreaded applications, you can use QTimer in any thread that has an event loop. To start an event loop from a non-GUI thread, use (). Qt uses the timer's to determine which thread will emit the signal. Because of this, you must start and stop the timer in its thread; it is not possible to start a timer from another thread.

 

摘自qt文档,qtimer要在living thread 开启和停止,由于qt利用 thread affinity判断哪个线程发送timeout signal

 

 

 

Accuracy and Timer Resolution

Timers will never time out earlier than the specified timeout value and they are not guaranteed to time out at the exact value specified. In many situations, they may time out late by a period of time that depends on the accuracy of the system timers.

The accuracy of timers depends on the underlying operating system and hardware. Most platforms support a resolution of 1 millisecond, though the accuracy of the timer will not equal this resolution in many real-world situations.

If Qt is unable to deliver the requested number of timer clicks, it will silently discard some.

 

 

timer只会延迟,不会早。

qt如果不能发送timer clicks,会丢弃一些。

转载地址:http://dapfm.baihongyu.com/

你可能感兴趣的文章
正则表达式30分钟入门教程
查看>>
新建DataTable添加列添加行
查看>>
[LeetCode]460.LFU缓存机制
查看>>
NaviSoft31.源码开发完成
查看>>
Maven: Cannot run program "protoc"
查看>>
英特尔® Software Guard Extensions 教程系列:第一部分,英特尔® SGX 基础
查看>>
ASP.NET WebApi OWIN 实现 OAuth 2.0(自定义获取 Token)
查看>>
Docker基本使用命令
查看>>
surfaceview组件的surfaceCreated()不被调用的解决方案
查看>>
2018 eclipse安装反编译插件
查看>>
Swift - AnyClass,元类型和 .self
查看>>
Swift实时画箭头的实现
查看>>
maven报错
查看>>
为什么我没有在Paragon NTFS上找到卸载的地方
查看>>
2018.7.13vue知识小结
查看>>
使用git工具上传自己的程序到github上
查看>>
(转)git checkout 撤销修改
查看>>
Android Retrofit2 数据解析
查看>>
如何实现‘请在微信客户端打开链接’
查看>>
解决Jira和Confluence访问打开越来越缓慢问题
查看>>