diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2014-12-08 23:36:06 +0900 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2014-12-08 23:36:06 +0900 |
commit | 8001fe67a3d66c95861ce1f7075ef03953670d13 (patch) | |
tree | 8d819778758fb45180ef8cdc468b3c2809cefbe9 /src/include | |
parent | 519b0757a37254452e013ea0ac95f4e56391608c (diff) | |
download | postgresql-8001fe67a3d66c95861ce1f7075ef03953670d13.tar.gz postgresql-8001fe67a3d66c95861ce1f7075ef03953670d13.zip |
Windows: use GetSystemTimePreciseAsFileTime if available
PostgreSQL on Windows 8 or Windows Server 2012 will now
get high-resolution timestamps by dynamically loading the
GetSystemTimePreciseAsFileTime function. It'll fall back to
to GetSystemTimeAsFileTime if the higher precision variant
isn't found, so the same binaries without problems on older
Windows releases.
No attempt is made to detect the Windows version. Only the
presence or absence of the desired function is considered.
Craig Ringer
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/port.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/port.h b/src/include/port.h index 94a0e2fe2b4..58677ec6bdf 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -328,6 +328,8 @@ extern FILE *pgwin32_popen(const char *command, const char *type); #ifndef HAVE_GETTIMEOFDAY /* Last parameter not used */ extern int gettimeofday(struct timeval * tp, struct timezone * tzp); +/* On windows we need to call some backend start setup for accurate timing */ +extern void init_win32_gettimeofday(void); #endif #else /* !WIN32 */ |