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>
2 files changed