From 068b59430679dd8c0d5e3ca812729fa7e734a12f Mon Sep 17 00:00:00 2001 From: Chris Dickens Date: Thu, 12 Jan 2017 11:01:59 -0800 Subject: 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 --- android/config.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'android') 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 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 header file. */ #define HAVE_INTTYPES_H 1 -- cgit v1.2.1