Click here to Skip to main content
11,928,078 members (50,593 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++ C Win32 Visual-Studio Python , +

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.

Posted 12-Feb-12 23:09pm
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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Hope this helps[^]

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.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