[PATCH resend 1/3] ntdll: Fix tick count calculation on Mac.
Huw Davies
huw at codeweavers.com
Wed Nov 27 02:40:03 CST 2019
On Tue, Nov 26, 2019 at 10:29:58PM -0600, Chip Davis wrote:
> Signed-off-by: Chip Davis <cdavis at codeweavers.com>
> ---
> configure.ac | 1 +
> dlls/ntdll/time.c | 4 ++++
> 2 files changed, 5 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 754dbe8b36e..2a049909a65 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2206,6 +2206,7 @@ AC_CHECK_FUNCS(\
> getopt_long_only \
> kqueue \
> lstat \
> + mach_continuous_time \
> pipe2 \
> poll \
> port_create \
> diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c
> index 91e5887b879..4e3d5583c7b 100644
> --- a/dlls/ntdll/time.c
> +++ b/dlls/ntdll/time.c
> @@ -111,6 +111,10 @@ static inline ULONGLONG monotonic_counter(void)
> static mach_timebase_info_data_t timebase;
>
> if (!timebase.denom) mach_timebase_info( &timebase );
> +#ifdef HAVE_MACH_CONTINUOUS_TIME
> + if (&mach_continuous_time != NULL)
> + return mach_continuous_time() * timebase.numer / timebase.denom / 100;
> +#endif
> return mach_absolute_time() * timebase.numer / timebase.denom / 100;
> #elif defined(HAVE_CLOCK_GETTIME)
> struct timespec ts;
This series should really be squashed into one patch. We don't want
commits where, for example, GetTickCount() and NtGetCountTick() differ
Huw.
More information about the wine-devel
mailing list