diff options
author | Lasse Collin <lasse.collin@tukaani.org> | 2023-09-24 22:58:53 +0300 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2023-10-22 18:59:45 +0300 |
commit | 46fd991cd2808ef62554853864c946232e7547f0 (patch) | |
tree | 183cc21c1651ae03746a83add25724fd8bdfa422 /NEWS | |
parent | xz/Windows: Use GetTickCount64() with MinGW-w64 if using Vista threads. (diff) | |
download | xz-46fd991cd2808ef62554853864c946232e7547f0.tar.xz |
xz/Windows: Ensure that clock_gettime() isn't used with MinGW-w64.
This commit alone doesn't change anything in the real-world:
- configure.ac currently checks for clock_gettime() only
when using pthreads.
- CMakeLists.txt doesn't check for clock_gettime() on Windows.
So clock_gettime() wasn't used with MinGW-w64 before either.
clock_gettime() provides monotonic time and it's better than
gettimeofday() in this sense. But clock_gettime() is defined
in winpthreads, and liblzma or xz needs nothing else from
winpthreads. By avoiding clock_gettime(), we avoid the dependency on
libwinpthread-1.dll or the need to link against the static version.
As a bonus, GetTickCount64() and MinGW-w64's gettimeofday() can be
faster than clock_gettime(CLOCK_MONOTONIC, &tv). The resolution
is more than good enough for the progress indicator in xz.
Diffstat (limited to 'NEWS')
0 files changed, 0 insertions, 0 deletions