Linux: more flexibility with monotonic clock
authorDaniel Drake <dsd@gentoo.org>
Fri, 11 Sep 2009 21:09:12 +0000 (22:09 +0100)
committerDaniel Drake <dsd@gentoo.org>
Fri, 11 Sep 2009 21:12:27 +0000 (22:12 +0100)
commit858684f0dd25921e09565034a88709dbf6f6c61b
treee45921eef51c4083197ba2cdc176e17f8d2f1cfa
parentfe0d8dce1ed704915d501e7da700440c78144211
Linux: more flexibility with monotonic clock

Some users have reported that CLOCK_MONOTONIC does not work on their
systems - I suspect it is available on x86 but perhaps not some
of the more uncommon architectures. We should fall back on
CLOCK_REALTIME in these cases.

Also, CLOCK_MONOTONIC_RAW seems even more monotonic, so we should use
that if it is available.

We now test different clock IDs during initialization to find the
best one that works.
libusb/os/linux_usbfs.c