diff -cpr HEAD/src/bin/psql/common.h psql_timing/src/bin/psql/common.h *** HEAD/src/bin/psql/common.h Sat Jan 6 07:19:49 2007 --- psql_timing/src/bin/psql/common.h Thu Apr 12 09:20:14 2007 *************** typedef struct timeval TimevalStruct; *** 79,93 **** ((int) ((T)->tv_usec - (U)->tv_usec))) / 1000.0) #else ! #include ! #include ! typedef struct _timeb TimevalStruct; ! #define GETTIMEOFDAY(T) _ftime(T) #define DIFF_MSEC(T, U) \ ! (((T)->time - (U)->time) * 1000.0 + \ ! ((T)->millitm - (U)->millitm)) #endif #endif /* COMMON_H */ --- 79,98 ---- ((int) ((T)->tv_usec - (U)->tv_usec))) / 1000.0) #else ! 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 #endif /* COMMON_H */