Improved DispatcherHelper to wait in milliseconds instead of seconds.