diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/pg_config.h.in | 3 | ||||
-rw-r--r-- | src/include/portability/instr_time.h | 68 | ||||
-rw-r--r-- | src/tools/msvc/Solution.pm | 1 |
3 files changed, 0 insertions, 72 deletions
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index dfee47a1a45..6505a842118 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -83,9 +83,6 @@ /* Define to 1 if you have the `BIO_meth_new' function. */ #undef HAVE_BIO_METH_NEW -/* Define to 1 if you have the `clock_gettime' function. */ -#undef HAVE_CLOCK_GETTIME - /* Define to 1 if your compiler handles computed gotos. */ #undef HAVE_COMPUTED_GOTO diff --git a/src/include/portability/instr_time.h b/src/include/portability/instr_time.h index ca09a1608f8..8faeca8b49e 100644 --- a/src/include/portability/instr_time.h +++ b/src/include/portability/instr_time.h @@ -57,8 +57,6 @@ #ifndef WIN32 -#ifdef HAVE_CLOCK_GETTIME - /* Use clock_gettime() */ #include <time.h> @@ -141,72 +139,6 @@ typedef struct timespec instr_time; #define INSTR_TIME_GET_MICROSEC(t) \ (((uint64) (t).tv_sec * (uint64) 1000000) + (uint64) ((t).tv_nsec / 1000)) -#else /* !HAVE_CLOCK_GETTIME */ - -/* Use gettimeofday() */ - -#include <sys/time.h> - -typedef struct timeval instr_time; - -#define INSTR_TIME_IS_ZERO(t) ((t).tv_usec == 0 && (t).tv_sec == 0) - -#define INSTR_TIME_SET_ZERO(t) ((t).tv_sec = 0, (t).tv_usec = 0) - -#define INSTR_TIME_SET_CURRENT(t) gettimeofday(&(t), NULL) - -#define INSTR_TIME_ADD(x,y) \ - do { \ - (x).tv_sec += (y).tv_sec; \ - (x).tv_usec += (y).tv_usec; \ - /* Normalize */ \ - while ((x).tv_usec >= 1000000) \ - { \ - (x).tv_usec -= 1000000; \ - (x).tv_sec++; \ - } \ - } while (0) - -#define INSTR_TIME_SUBTRACT(x,y) \ - do { \ - (x).tv_sec -= (y).tv_sec; \ - (x).tv_usec -= (y).tv_usec; \ - /* Normalize */ \ - while ((x).tv_usec < 0) \ - { \ - (x).tv_usec += 1000000; \ - (x).tv_sec--; \ - } \ - } while (0) - -#define INSTR_TIME_ACCUM_DIFF(x,y,z) \ - do { \ - (x).tv_sec += (y).tv_sec - (z).tv_sec; \ - (x).tv_usec += (y).tv_usec - (z).tv_usec; \ - /* Normalize after each add to avoid overflow/underflow of tv_usec */ \ - while ((x).tv_usec < 0) \ - { \ - (x).tv_usec += 1000000; \ - (x).tv_sec--; \ - } \ - while ((x).tv_usec >= 1000000) \ - { \ - (x).tv_usec -= 1000000; \ - (x).tv_sec++; \ - } \ - } while (0) - -#define INSTR_TIME_GET_DOUBLE(t) \ - (((double) (t).tv_sec) + ((double) (t).tv_usec) / 1000000.0) - -#define INSTR_TIME_GET_MILLISEC(t) \ - (((double) (t).tv_sec * 1000.0) + ((double) (t).tv_usec) / 1000.0) - -#define INSTR_TIME_GET_MICROSEC(t) \ - (((uint64) (t).tv_sec * (uint64) 1000000) + (uint64) (t).tv_usec) - -#endif /* HAVE_CLOCK_GETTIME */ - #else /* WIN32 */ /* Use QueryPerformanceCounter() */ diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index dd9d1a58ad6..bd8b755b964 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -228,7 +228,6 @@ sub GenerateFiles HAVE_BACKTRACE_SYMBOLS => undef, HAVE_BIO_GET_DATA => undef, HAVE_BIO_METH_NEW => undef, - HAVE_CLOCK_GETTIME => undef, HAVE_COMPUTED_GOTO => undef, HAVE_COPYFILE => undef, HAVE_COPYFILE_H => undef, |