mirror of
https://github.com/postgres/postgres.git
synced 2025-11-21 00:42:43 +03:00
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
This commit is contained in:
@@ -260,6 +260,12 @@ startup_hacks(const char *progname)
|
||||
|
||||
/* In case of general protection fault, don't show GUI popup box */
|
||||
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
|
||||
|
||||
#ifndef HAVE_GETTIMEOFDAY
|
||||
/* Figure out which syscall to use to capture timestamp information */
|
||||
init_win32_gettimeofday();
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif /* WIN32 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user