diff options
Diffstat (limited to 'src/bin/psql/common.h')
-rw-r--r-- | src/bin/psql/common.h | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/src/bin/psql/common.h b/src/bin/psql/common.h index c8cefe1843f..7977eb5493c 100644 --- a/src/bin/psql/common.h +++ b/src/bin/psql/common.h @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2008, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/common.h,v 1.56 2008/01/01 19:45:55 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/common.h,v 1.57 2008/05/14 19:10:29 tgl Exp $ */ #ifndef COMMON_H #define COMMON_H @@ -63,36 +63,4 @@ extern const char *session_username(void); extern char *expand_tilde(char **filename); -#ifndef WIN32 - -#include <sys/time.h> - -typedef struct timeval TimevalStruct; - -#define GETTIMEOFDAY(T) gettimeofday(T, NULL) -#define DIFF_MSEC(T, U) \ - ((((int) ((T)->tv_sec - (U)->tv_sec)) * 1000000.0 + \ - ((int) ((T)->tv_usec - (U)->tv_usec))) / 1000.0) -#else -/* - * To get good resolution (better than ~15ms) on Windows, use - * the high resolution performance counters. They can't be used - * to get absolute times, but are good for measuring differences. - */ -static __inline__ double -GetTimerFrequency(void) -{ - LARGE_INTEGER f; - - QueryPerformanceFrequency(&f); - return (double) f.QuadPart; -} - -typedef LARGE_INTEGER TimevalStruct; - -#define GETTIMEOFDAY(T) QueryPerformanceCounter((T)) -#define DIFF_MSEC(T, U) \ - (((T)->QuadPart - (U)->QuadPart) * 1000.0 / GetTimerFrequency()) -#endif /* WIN32 */ - #endif /* COMMON_H */ |