Click here to Skip to main content
15,879,490 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,

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
Posted
Comments
Jochen Arndt 13-Feb-12 8:00am    
What exactly do you mean by USB enumeration time? The time from pluggin in an USB device until its presence is signalled by Windows?
pramod037 13-Feb-12 11:24am    
Yes, that is the time i need to measure in Windows.

Hope this helps

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

Accept and vote this if helps
--Rahul D.
 
Share this answer
 
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 [^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900