Prevent exausting CPU in "WaitForDevice" method.

Entering an endless loop will exaust CPU.
Since this method must be called in a child thread in Windows Presentation Foundation (WPF) or Windows Form Apps, sleeping thread for 250 miliSecond (1/4 of a second)
will be more friendly to the CPU. Nontheless checking 4 times for a connected device in each second is more than enough, and will not result in late response from the app if a device gets connected.
Any thoughts?

Submitted By: DeepUnknown from Xda-Developers.com