diff --git a/winsup/cygwin/clock.cc b/winsup/cygwin/clock.cc index 0c0bd9994..1c675f0f2 100644 --- a/winsup/cygwin/clock.cc +++ b/winsup/cygwin/clock.cc @@ -40,13 +40,8 @@ clk_t::init () void inline clk_realtime_t::init () { - if (wincap.has_precise_system_time ()) - { - if (!ticks_per_sec) - InterlockedExchange64 (&ticks_per_sec, system_qpc_tickspersec ()); - } - else if (!period) - InterlockedExchange64 (&period, system_tickcount_period ()); + if (!ticks_per_sec) + InterlockedExchange64 (&ticks_per_sec, system_qpc_tickspersec ()); } void inline @@ -74,9 +69,7 @@ clk_realtime_t::now (clockid_t clockid, struct timespec *ts) { LARGE_INTEGER now; - wincap.has_precise_system_time () - ? GetSystemTimePreciseAsFileTime ((LPFILETIME) &now) - : GetSystemTimeAsFileTime ((LPFILETIME) &now); + GetSystemTimePreciseAsFileTime ((LPFILETIME) &now); /* Add conversion factor for UNIX vs. Windows base time */ now.QuadPart -= FACTOR; ts->tv_sec = now.QuadPart / NS100PERSEC; @@ -236,10 +229,7 @@ clk_realtime_t::resolution (struct timespec *ts) { init (); ts->tv_sec = 0; - if (wincap.has_precise_system_time ()) - ts->tv_nsec = NSPERSEC / ticks_per_sec; - else - ts->tv_nsec = period * (NSPERSEC/NS100PERSEC); + ts->tv_nsec = NSPERSEC / ticks_per_sec; } void diff --git a/winsup/cygwin/local_includes/wincap.h b/winsup/cygwin/local_includes/wincap.h index 1075f3bea..0a2ad7b59 100644 --- a/winsup/cygwin/local_includes/wincap.h +++ b/winsup/cygwin/local_includes/wincap.h @@ -17,7 +17,6 @@ struct wincaps ops generated by gcc are off by 4 bytes. */ struct __attribute__ ((aligned (8))) { unsigned is_server : 1; - unsigned has_precise_system_time : 1; unsigned has_microsoft_accounts : 1; unsigned has_new_pebteb_region : 1; unsigned has_broken_whoami : 1; @@ -75,7 +74,6 @@ public: } intptr_t IMPLEMENT (mmap_storage_high) bool IMPLEMENT (is_server) - bool IMPLEMENT (has_precise_system_time) bool IMPLEMENT (has_microsoft_accounts) bool IMPLEMENT (has_new_pebteb_region) bool IMPLEMENT (has_broken_whoami) diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index 4ab432925..ddea061b8 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -29,9 +29,7 @@ details. */ static inline void __attribute__ ((always_inline)) get_system_time (PLARGE_INTEGER systime) { - wincap.has_precise_system_time () - ? GetSystemTimePreciseAsFileTime ((LPFILETIME) systime) - : GetSystemTimeAsFileTime ((LPFILETIME) systime); + GetSystemTimePreciseAsFileTime ((LPFILETIME) systime); } /* Cygwin internal */ diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 15400d8d0..7ee8f4b06 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -24,7 +24,6 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = { mmap_storage_high:__MMAP_STORAGE_HIGH_LEGACY, { is_server:false, - has_precise_system_time:false, has_microsoft_accounts:false, has_new_pebteb_region:false, has_broken_whoami:true, @@ -54,7 +53,6 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = { mmap_storage_high:__MMAP_STORAGE_HIGH_LEGACY, { is_server:false, - has_precise_system_time:true, has_microsoft_accounts:true, has_new_pebteb_region:false, has_broken_whoami:false, @@ -84,7 +82,6 @@ wincaps wincap_8_1 __attribute__((section (".cygwin_dll_common"), shared)) = { mmap_storage_high:__MMAP_STORAGE_HIGH, { is_server:false, - has_precise_system_time:true, has_microsoft_accounts:true, has_new_pebteb_region:false, has_broken_whoami:false, @@ -114,7 +111,6 @@ wincaps wincap_10_1507 __attribute__((section (".cygwin_dll_common"), shared)) mmap_storage_high:__MMAP_STORAGE_HIGH, { is_server:false, - has_precise_system_time:true, has_microsoft_accounts:true, has_new_pebteb_region:false, has_broken_whoami:false, @@ -144,7 +140,6 @@ wincaps wincap_10_1607 __attribute__((section (".cygwin_dll_common"), shared)) mmap_storage_high:__MMAP_STORAGE_HIGH, { is_server:false, - has_precise_system_time:true, has_microsoft_accounts:true, has_new_pebteb_region:false, has_broken_whoami:false, @@ -174,7 +169,6 @@ wincaps wincap_10_1703 __attribute__((section (".cygwin_dll_common"), shared)) = mmap_storage_high:__MMAP_STORAGE_HIGH, { is_server:false, - has_precise_system_time:true, has_microsoft_accounts:true, has_new_pebteb_region:true, has_broken_whoami:false, @@ -204,7 +198,6 @@ wincaps wincap_10_1709 __attribute__((section (".cygwin_dll_common"), shared)) = mmap_storage_high:__MMAP_STORAGE_HIGH, { is_server:false, - has_precise_system_time:true, has_microsoft_accounts:true, has_new_pebteb_region:true, has_broken_whoami:false, @@ -234,7 +227,6 @@ wincaps wincap_10_1803 __attribute__((section (".cygwin_dll_common"), shared)) = mmap_storage_high:__MMAP_STORAGE_HIGH, { is_server:false, - has_precise_system_time:true, has_microsoft_accounts:true, has_new_pebteb_region:true, has_broken_whoami:false, @@ -264,7 +256,6 @@ wincaps wincap_10_1809 __attribute__((section (".cygwin_dll_common"), shared)) = mmap_storage_high:__MMAP_STORAGE_HIGH, { is_server:false, - has_precise_system_time:true, has_microsoft_accounts:true, has_new_pebteb_region:true, has_broken_whoami:false, @@ -294,7 +285,6 @@ wincaps wincap_10_1903 __attribute__((section (".cygwin_dll_common"), shared)) = mmap_storage_high:__MMAP_STORAGE_HIGH, { is_server:false, - has_precise_system_time:true, has_microsoft_accounts:true, has_new_pebteb_region:true, has_broken_whoami:false, @@ -324,7 +314,6 @@ wincaps wincap_10_2004 __attribute__((section (".cygwin_dll_common"), shared)) = mmap_storage_high:__MMAP_STORAGE_HIGH, { is_server:false, - has_precise_system_time:true, has_microsoft_accounts:true, has_new_pebteb_region:true, has_broken_whoami:false, @@ -354,7 +343,6 @@ wincaps wincap_11 __attribute__((section (".cygwin_dll_common"), shared)) = { mmap_storage_high:__MMAP_STORAGE_HIGH, { is_server:false, - has_precise_system_time:true, has_microsoft_accounts:true, has_new_pebteb_region:true, has_broken_whoami:false,