zoukankan      html  css  js  c++  java
  • 定时器潜在的6ms延迟 ~6ms latency in the timer


      如果你做过Windows mobile Gesture开发,就会在 GesturePhysicsEngine.h 头文件发现如下一段定义说明:

    /// <summary>
    /// Defines a common value for a normal frame delay rate expected to be used when displaying
    /// output from the physics engine. We are aiming at 25fps and also allow ~6ms latency in the timer
    /// </summary>
    #define GESTURE_ANIMATION_FRAME_DELAY_MS  34 

    该文件在 “..\Windows Mobile 6 SDK\PocketPC\Include\Armv4i\  目录下。注释的大概意思为:

      “为普通帧延迟率定义一个公共值,该值在从物理引擎显示输出时使用 。目标是25fps并且允许定时器中潜在的6ms延迟。”

    从上面的注释我们可以知道:在每帧刷新后可能有6秒延迟,设置的延迟为34ms,所以实际的每帧需要的时间为40ms。

    上面的定义也说明了这点:

    #define GESTURE_ANIMATION_FRAME_DELAY_MS  34 

    1000 / 34 ≈ 29; 

    如果考虑到6ms的延迟,那么:

    1000 / (34 + 6) = 25;

    刚好和注释中的25fps吻合,这也就证明了我们的观点。 

      


     
  • 相关阅读:
    hdu 1524
    hdu 1536
    转载一篇博弈博弈入门的好文章
    nim 博弈
    WPF 从Main函数启动
    C# map network drive sample
    Predicate 学习
    WPF 绑定到附加属性 绑定到只读属性
    WPF 带有watermark的文本输入框
    使用Windows服务发布WCF服务
  • 原文地址:https://www.cnblogs.com/Lisen/p/1659244.html
Copyright © 2011-2022 走看看