Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/kernel32/cpu.c | 45 -------------------------------------------- dlls/kernel32/time.c | 42 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 45 deletions(-)
diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c index 9445d0bc05..6e549a0f31 100644 --- a/dlls/kernel32/cpu.c +++ b/dlls/kernel32/cpu.c @@ -46,51 +46,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(reg);
-/**************************************************************************** - * QueryPerformanceCounter (KERNEL32.@) - * - * Get the current value of the performance counter. - * - * PARAMS - * counter [O] Destination for the current counter reading - * - * RETURNS - * Success: TRUE. counter contains the current reading - * Failure: FALSE. - * - * SEE ALSO - * See QueryPerformanceFrequency. - */ -BOOL WINAPI QueryPerformanceCounter(PLARGE_INTEGER counter) -{ - NtQueryPerformanceCounter( counter, NULL ); - return TRUE; -} - - -/**************************************************************************** - * QueryPerformanceFrequency (KERNEL32.@) - * - * Get the resolution of the performance counter. - * - * PARAMS - * frequency [O] Destination for the counter resolution - * - * RETURNS - * Success. TRUE. Frequency contains the resolution of the counter. - * Failure: FALSE. - * - * SEE ALSO - * See QueryPerformanceCounter. - */ -BOOL WINAPI QueryPerformanceFrequency(PLARGE_INTEGER frequency) -{ - LARGE_INTEGER counter; - NtQueryPerformanceCounter( &counter, frequency ); - return TRUE; -} - - /*********************************************************************** * GetSystemInfo [KERNEL32.@] * diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c index 35472c2400..bc7db67e38 100644 --- a/dlls/kernel32/time.c +++ b/dlls/kernel32/time.c @@ -1621,3 +1621,45 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetTickCount(void) { return monotonic_counter() / 10000; } + +/**************************************************************************** + * QueryPerformanceCounter (KERNEL32.@) + * + * Get the current value of the performance counter. + * + * PARAMS + * counter [O] Destination for the current counter reading + * + * RETURNS + * Success: TRUE. counter contains the current reading + * Failure: FALSE. + * + * SEE ALSO + * See QueryPerformanceFrequency. + */ +BOOL WINAPI QueryPerformanceCounter(LARGE_INTEGER *counter) +{ + counter->QuadPart = monotonic_counter(); + return TRUE; +} + +/**************************************************************************** + * QueryPerformanceFrequency (KERNEL32.@) + * + * Get the resolution of the performance counter. + * + * PARAMS + * frequency [O] Destination for the counter resolution + * + * RETURNS + * Success. TRUE. Frequency contains the resolution of the counter. + * Failure: FALSE. + * + * SEE ALSO + * See QueryPerformanceCounter. + */ +BOOL WINAPI QueryPerformanceFrequency(LARGE_INTEGER *frequency) +{ + frequency->QuadPart = TICKSPERSEC; + return TRUE; +}
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=51729
Your paranoid android.
=== debian9 (32 bit Chinese:China report) ===
ntdll: pipe.c:1557: Test failed: pipe is not signaled pipe.c:1557: Test failed: pipe is not signaled