summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorChris Dickens <christopher.a.dickens@gmail.com>2017-01-12 11:01:59 -0800
committerChris Dickens <christopher.a.dickens@gmail.com>2017-01-12 15:03:16 -0800
commit068b59430679dd8c0d5e3ca812729fa7e734a12f (patch)
treed964351bc6d05dfc000d754ecc78239c8f438c49 /android
parent80f1657f063d17c751b9532c1f4e56e1c23e699f (diff)
downloadlibusb-068b59430679dd8c0d5e3ca812729fa7e734a12f.tar.gz
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>
Diffstat (limited to 'android')
-rw-r--r--android/config.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/android/config.h b/android/config.h
index 78387d3..0dd35e2 100644
--- a/android/config.h
+++ b/android/config.h
@@ -26,9 +26,6 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
-/* Define to 1 if you have the `gettimeofday' function. */
-#define HAVE_GETTIMEOFDAY 1
-
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1