下载此文档

七种vc延时方法(Seven VC delay methods).doc


文档分类:医学/心理学 | 页数:约10页 举报非法文档有奖
1/10
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/10 下载此文档
文档列表 文档介绍
七种vc延时方法(Seven VC delay methods).doc七种vc延时方法(Seven VC delay methods)
Seven VC delay
One way: WM_TIMER message mapping in VC can be a simple time control. First, the function call SetTimer () set the time interval, such as SetTimer (0200, NULL) is to set the time interval of 200ms. Then increase the time response function of OnTimer in the application (), and add a statement response in this function is used plete the arrival time of the operation. This timing method is very simple, can achieve a timing function, but its timing function as Sleep () function of the delay function, the precision is very low, only the minimum time of 30ms accuracy, CPU occupation is low, and the timer messages in a multitasking operating system in very low priority, not to respond in a timely manner, often can not meet the application of real-time control environment. Can only be used to achieve the dynamic display of bitmap such as timing accuracy without high requirement. Such as the example of Timer1 project.
Two: the use of sleep VC () function to realize time delay, its unit is MS, such as delay of 2 seconds, sleep (2000). The accuracy is very low, only the minimum time of 30ms accuracy, with the disadvantage of sleep function lies in the delay period can not deal with other news, if the time is too long, just like the crash, CPU occupancy rate is very high, can only be used for less demanding delay procedures. Such as the ex

七种vc延时方法(Seven VC delay methods) 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数10
  • 收藏数0 收藏
  • 顶次数0
  • 上传人xinsheng2008
  • 文件大小31 KB
  • 时间2018-08-30