1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-15694 Windows : use GetSystemTimePreciseAsFileTime if available for high resolution time

Use high accuracy timer on Windows 8.1+ for system versioning,it needs
accurate high resoution start query time.

Continue to use the inaccurate (but much faster timer function)
GetSystemTimeAsFileTime() where accuracy does not matter, e.g in
set_timespec_time_nsec(),or my_time()
This commit is contained in:
Vladislav Vaintroub
2018-03-27 20:10:17 +00:00
parent 04bac13b30
commit 19bb7fdcd6
3 changed files with 44 additions and 10 deletions

View File

@@ -307,7 +307,7 @@ int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
#ifndef set_timespec_nsec
#define set_timespec_nsec(ABSTIME,NSEC) \
set_timespec_time_nsec((ABSTIME), my_hrtime().val*1000 + (NSEC))
set_timespec_time_nsec((ABSTIME), my_hrtime_coarse().val*1000 + (NSEC))
#endif /* !set_timespec_nsec */
/* adapt for two different flavors of struct timespec */