Click here to Skip to main content
11,630,144 members (80,348 online)
Rate this: bad
good
Please Sign up or sign in to vote.
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 12-Feb-12 22:09pm
Comments
Jochen Arndt at 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 at 13-Feb-12 11:24am
   
Yes, that is the time i need to measure in Windows.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hope this helps

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

Accept and vote this if helps
--Rahul D.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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 [^].
  Permalink  

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

  Print Answers RSS


Advertise | Privacy | Mobile
Web02 | 2.8.150723.1 | Last Updated 13 Feb 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100