The current code for calculating the timeout in darwin_reenumerate_device_timeout...
authorAndrew Goodney <agoodney@yahoo.com>
Tue, 28 Dec 2021 04:34:05 +0000 (20:34 -0800)
committerNathan Hjelm <hjelmn@google.com>
Tue, 18 Jan 2022 22:32:24 +0000 (15:32 -0700)
commitc1ed5895438f2ae3767162f74388b09a16ab0800
tree70f824305d29dab77b0cee0dc027701f257815df
parentf2b218b61867f27568ba74fa38e156e5f55ed825
The current code for calculating the timeout in darwin_reenumerate_device_timeout() doesn't calculate elapsed microseconds, it counts the number of times the loop runs.

This results in very long timeouts.

This PR uses clock_gettime(CLOCK_MONOTONIC, ...) to calculate the elapsed time

Closes #1035

Signed-off-by: Nathan Hjelm <hjelmn@google.com>
libusb/os/darwin_usb.c
libusb/version_nano.h