3289|2

79

帖子

0

TA的资源

一粒金砂(初级)

楼主
 

请问能在WDM驱动中使用GetTickCount吗 [复制链接]

如果想获得一个粗劣的计时器,可以用什么方法?

比如 QueryPerfermanceXXXX ?

最新回复

在驱动中可以使用别的定时器函数。如下: IoInitializeTimer:   Associates a timer with the given device object and registers a driver-supplied    IoTimer routine for the device object. IoStartTimer:   Enables the timer for a given device object and calls the driver-supplied IoTimer routine once every second. IoStopTimer :   Disables the timer for a given device object so the driver-supplied IoTimer routine is not called unless the driver re-enables the timer. KeInitializeDpc:   Initializes a DPC object and sets up a driver-supplied CustomTimerDpc routine that can be called with a given context. KeInitializeTimer:   Initializes a notification timer object to the Not-Signaled state. KeInitializeTimerEx:   Initializes a notification or synchronization timer object to the Not-Signaled state. KeSetTimer:   Sets the absolute or relative interval at which a timer object will be set to the Signaled state; optionally supplies a timer DPC to be executed when the interval expires. KeSetTimerEx:   Sets the absolute or relative interval at which a timer object will be set to the Signaled state; optionally supplies a timer DPC to be executed when the interval expires; and optionally supplies a recurring interval for the timer. KeCancelTimer:   Cancels a timer object before the interval passed to KeSetTimer expires; dequeues a timer DPC before the timer interval, if any was set, expires. KeReadStateTimer:   Returns TRUE if a given timer object is set to the Signaled state. KeQuerySystemTime :   Returns the current system time. KeQueryTickCount:   Returns the number of interval-timer interrupts that have occurred since the system was booted. KeQueryTimeIncrement:   Returns the number of 100-nanosecond units that are added to the system time at each interval-timer interrupt. KeQueryInterruptTime:   Returns the current value of the system interrupt-time count in 100-nanosecond units. KeQueryPerformanceCounter:   Returns the system performance counter value in hertz. 如果想看更具体的,请参阅windowsddk  详情 回复 发表于 2007-1-13 20:56
点赞 关注

回复
举报

95

帖子

0

TA的资源

一粒金砂(初级)

沙发
 
不能用,以前的帖子中有介绍,函数名字记得不是很清楚了,可以去找找
 
 

回复

68

帖子

0

TA的资源

一粒金砂(初级)

板凳
 
在驱动中可以使用别的定时器函数。如下:
IoInitializeTimer:
  Associates a timer with the given device object and registers a driver-supplied    IoTimer routine for the device object.
IoStartTimer:
  Enables the timer for a given device object and calls the driver-supplied IoTimer routine once every second.
IoStopTimer :
  Disables the timer for a given device object so the driver-supplied IoTimer routine is not called unless the driver re-enables the timer.
KeInitializeDpc:
  Initializes a DPC object and sets up a driver-supplied CustomTimerDpc routine that can be called with a given context.
KeInitializeTimer:
  Initializes a notification timer object to the Not-Signaled state.
KeInitializeTimerEx:
  Initializes a notification or synchronization timer object to the Not-Signaled state.
KeSetTimer:
  Sets the absolute or relative interval at which a timer object will be set to the Signaled state; optionally supplies a timer DPC to be executed when the interval expires.
KeSetTimerEx:
  Sets the absolute or relative interval at which a timer object will be set to the Signaled state; optionally supplies a timer DPC to be executed when the interval expires; and optionally supplies a recurring interval for the timer.
KeCancelTimer:
  Cancels a timer object before the interval passed to KeSetTimer expires; dequeues a timer DPC before the timer interval, if any was set, expires.
KeReadStateTimer:
  Returns TRUE if a given timer object is set to the Signaled state.
KeQuerySystemTime :
  Returns the current system time.
KeQueryTickCount:
  Returns the number of interval-timer interrupts that have occurred since the system was booted.
KeQueryTimeIncrement:
  Returns the number of 100-nanosecond units that are added to the system time at each interval-timer interrupt.
KeQueryInterruptTime:
  Returns the current value of the system interrupt-time count in 100-nanosecond units.
KeQueryPerformanceCounter:
  Returns the system performance counter value in hertz.
如果想看更具体的,请参阅windowsddk
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/6 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表