USB枚举时间 [英] USB Enumeration Time

查看:182
本文介绍了USB枚举时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



作为我的项目的一部分,我需要测量OS中的USB枚举时间并将其显示给用户.我不确定Windows 7是否已实现.因此,如果尚未实现,我可以使用Python来获取相同的语言,还是哪种语言可以获取这些值?

请帮忙.

谢谢,
Pramod



As part of my project, i need to measure the USB enumeration time in OS and display to the user. I''m not sure whether that''s already implemented in Windows 7. So, if it''s not implemented, can i use Python to get the same, or which is the good language to get those values?

Please help.

Thanks,
Pramod

推荐答案

希望这会有所帮助

http://www.teamwavelength.com/permanent/usb/docs/api/src/cs-win-001.html [ ^ ]

如果有帮助,请接受并投票
--Rahul D.
Hope this helps

http://www.teamwavelength.com/permanent/usb/docs/api/src/cs-win-001.html[^]

Accept and vote this if helps
--Rahul D.


据我所知,Windows本身并不测量时间.没有理由这样做.

如果有解决时间的方法,C ++将是最佳选择.因为您需要添加某种由plugin事件触发的低级处理程序.插入USB设备后,准备使用该设备时,会在所有顶级窗口中显示WM_DEVICECHANGE / DBT_DEVICEARRIVAL消息.这可以用来检测结束时间.但是检测启动时间需要深入了解内核USB驱动程序.

该链接描述了插件[
As far as I know, Windows does not measure the time itself. There is no reason to do so.

If there is any solution to measure the time, C++ would be the best choice. Because you need to add some kind of low-level handler that is triggered by the plugin event. When an USB device is plugged in, a WM_DEVICECHANGE / DBT_DEVICEARRIVAL message is posted to all top level windows when the device is ready for use. This can be used to detect the end time. But detection of start time requires hooking deep into the kernels USB driver.

This link describes what happens upon plugin [^].


这篇关于USB枚举时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆