测量亚毫秒级延迟的最精确方法 [英] Most precise way to measure sub-ms delays
问题描述
测量代码执行中亚毫秒级延迟的最精确方法是什么? (VS2010,Win32)
What is the most precise way to measure sub-millisecond delays in code execution? (VS2010,Win32)
谢谢
推荐答案
这是一本好书:http://software.intel.com/zh-cn/articles /measure-code-sections-using-enhanced-timer/
This is a good read: http://software.intel.com/en-us/articles/measure-code-sections-using-the-enhanced-timer/
,也 这是有关如何使用QueryPerformanceCounter()的示例.
and also here is a sample on how to use QueryPerformanceCounter().
http://support.microsoft.com/kb/172338
http://support.microsoft.com/kb/172338
您会注意到上面的示例具有以下信息:
You'll notice that the sample above has this info:
QueryPerformanceCounter最低分辨率:1/1193182秒
API开销:1.92761875388667E-05秒
QueryPerformanceCounter minimum resolution: 1/1193182 sec
API Overhead: 1.92761875388667E-05 seconds
-Seetharam
-Seetharam
这篇关于测量亚毫秒级延迟的最精确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!