阅读:1623回复:7
解释一下,很简单
KeQueryPerformanceCounter
win2k ddk中,帮忙解释一下,正确马上给分。 |
|
|
沙发#
发布于:2004-10-28 20:34
我也顶!
|
|
板凳#
发布于:2002-12-04 16:50
我顶
|
|
|
地板#
发布于:2002-11-28 11:44
获取性能计数器的当前值. WINNT在一定时间间隔就会更新计数器. 时间间隔大小,通过提供PerformanceFrequency的存储空间, 让函数填写.PerformanceFrequency中将返回2百万,那么更新频率就是2百万分之1秒更新一次此计数器. 我是想知道这个计数器是什么东东,系统用它通常来做什么?返回值受什么因素影响? |
|
|
地下室#
发布于:2002-11-27 19:41
KeQueryPerformanceCounter返回一个从系统启动以来的一个64位滴答(系统中非常小的时间单位)数目值.它用来反应系统的性能的度量.
正如楼上的解释返回值是2000000时,那么刷新就是1/2000000的时间间隔增加计数器,不要频繁的调用该例程会降低系统的I/O性能 |
|
|
5楼#
发布于:2002-11-27 14:43
获取性能计数器的当前值. WINNT在一定时间间隔就会更新计数器. 时间间隔大小,通过提供PerformanceFrequency的存储空间, 让函数填写.PerformanceFrequency中将返回2百万,那么更新频率就是2百万分之1秒更新一次此计数器.
|
|
|
6楼#
发布于:2002-11-27 09:50
用户被禁言,该主题自动屏蔽! |
|
7楼#
发布于:2002-11-26 17:31
KeQueryPerformanceCounter
LARGE_INTEGER KeQueryPerformanceCounter( IN PLARGE_INTEGER PerformanceFrequency OPTIONAL ); KeQueryPerformanceCounter provides the finest grained running count available in the system. Parameters PerformanceFrequency Specifies an optional pointer to a variable that is to receive the performance counter frequency. Include wdm.h or ntddk.h Return Value KeQueryPerformanceCounter returns the performance counter value in units of ticks. Comments KeQueryPerformanceCounter always returns a 64-bit integer representing the number of ticks. Accumulating the count begins when the system is booted. The count is in ticks; the frequency is reported by PerformanceFrequency if this optional parameter is supplied. The resolution of the timer used to accumulate the current count can be obtained by specifying PerformanceFrequency. For example, if the returned PerformanceFrequency is 2 million, each tick is 1/2 millionth of a second. Each 1/x millionth increment of the count corresponds to one second of elapsed time. KeQueryPerformanceCounter is intended for time-stamping packets or for computing performance and capacity measurements. It is not intended for measuring elapsed time, for computing stalls or waits, or for iterations. Use this routine as infrequently as possible. Depending on the platform, KeQueryPerformanceCounter can disable system-wide interrupts for a minimal interval. Consequently, calling this routine frequently or repeatedly, as in an iteration, defeats its purpose of returning very fine-grained, running time-stamp information. Calling this routine too frequently can degrade I/O performance for the calling driver and for the system as a whole. 解释的挺详细,还是搞不清是什么东西???郁闷!!! |
|
|