Windows 内核相当于 FreeBSD 的ticks 或Linux 的内核。最新 WDK 中的 jiffies
我正在使用最新的 WDK 开发 Windows NDIS 驱动程序,该驱动程序需要单调非递减的毫秒分辨率内核时间计数器。我浏览了 MSDN 以及 WDK 的文档,但除了名为 TsTime 的东西之外没有发现任何有用的东西,我不确定它是否只是一个示例的虚构名称或一个实际变量。我知道 NDISGetCurrentSystemTime,但希望拥有一些开销较低的东西,例如刻度或 jiffies,除非 NDISGetCurrentSystemTime 本身开销较低。
似乎应该有一个低开销的全局变量来存储某种内核时间计数器。任何人都知道这可能是什么?
I am working on a Windows NDIS driver using the latest WDK that is in need of a millisecond resolution kernel time counter that is monotonically non-decreasing. I looked through MSDN as well as WDK's documentation but found nothing useful except something called TsTime, which I am not sure whether is just a made-up name for an example or an actual variable. I am aware of NDISGetCurrentSystemTime, but would like to have something that is lower-overhead like ticks or jiffies, unless NDISGetCurrentSystemTime itself is low-overhead.
It seems that there ought to be a low-overhead global variable that stores some sort of kernel time counter. Anyone has insight on what this may be?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用
KeQueryTickCount
。也许使用KeQueryTimeIncrement
一次就能够将滴答计数转换为更有意义的时间单位。Use
KeQueryTickCount
. And perhaps useKeQueryTimeIncrement
once to be able to convert the tick count into a more meaningful time unit.GetTickCount
< 怎么样? /a> /GetTickCount64
(检查后者的要求)How about
GetTickCount
/GetTickCount64
(Check the reqs on the latter)