2 Commits

Author SHA1 Message Date
Chris Dickens 068b594306 core: Remove use of gettimeofday()
Prior to this commit, gettimeofday() was being used for timestamps
in debug messages. This function has been marked as deprecated in
the latest POSIX specification and furthermore is not supported on
Windows, thus requiring our own implementation as usbi_gettimeofday().

This commit changes the logging code to obtain timestamps using the
clock_gettime() function provided by the backend. The implementation of
usbi_gettimeofday() for Windows was actually equivalent to that of the
USBI_CLOCK_REALTIME implementation for clock_gettime(), so this
eliminates code duplication. In addition, the USBI_CLOCK_REALTIME
implementation has been updated for Windows to leverage the
timespec_get() function available in VS 2015 and later.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
2017-01-12 15:03:16 -08:00
Ludovic Rousseau a0d7a89c33 Add minimal config.h for Xcode
Xcode do not use ./configure so the config.h file needs to be generated
by hand.
This config.h is the minimal file for libusbx built using Xcode.
2013-07-30 10:41:44 -06:00