From: Brendan Shanks <bshanks(a)codeweavers.com> --- dlls/kernelbase/kernelbase.spec | 2 +- dlls/kernelbase/sync.c | 17 +++++++++++++++++ include/realtimeapiset.h | 1 + 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/dlls/kernelbase/kernelbase.spec b/dlls/kernelbase/kernelbase.spec index 8596868df61..d4b838fd532 100644 --- a/dlls/kernelbase/kernelbase.spec +++ b/dlls/kernelbase/kernelbase.spec @@ -1234,7 +1234,7 @@ @ stdcall QueryFullProcessImageNameW(ptr long ptr ptr) # @ stub QueryIdleProcessorCycleTime # @ stub QueryIdleProcessorCycleTimeEx -# @ stub QueryInterruptTime +@ stdcall QueryInterruptTime(ptr) # @ stub QueryInterruptTimePrecise @ stdcall QueryMemoryResourceNotification(ptr ptr) # @ stub QueryOptionalDelayLoadedAPI diff --git a/dlls/kernelbase/sync.c b/dlls/kernelbase/sync.c index 8e1956c0d6a..7cb8527cc59 100644 --- a/dlls/kernelbase/sync.c +++ b/dlls/kernelbase/sync.c @@ -205,6 +205,23 @@ ULONGLONG WINAPI DECLSPEC_HOTPATCH GetTickCount64(void) } +/****************************************************************************** + * QueryInterruptTime (kernelbase.@) + */ +void WINAPI DECLSPEC_HOTPATCH QueryInterruptTime( ULONGLONG *time ) +{ + ULONG high, low; + + do + { + high = user_shared_data->InterruptTime.High1Time; + low = user_shared_data->InterruptTime.LowPart; + } + while (high != user_shared_data->InterruptTime.High2Time); + *time = (ULONGLONG)high << 32 | low; +} + + /****************************************************************************** * QueryUnbiasedInterruptTimePrecise (kernelbase.@) */ diff --git a/include/realtimeapiset.h b/include/realtimeapiset.h index 7c077035147..49805919924 100644 --- a/include/realtimeapiset.h +++ b/include/realtimeapiset.h @@ -23,6 +23,7 @@ extern "C" { #endif +WINBASEAPI void WINAPI QueryInterruptTime(ULONGLONG *); WINBASEAPI void WINAPI QueryUnbiasedInterruptTimePrecise(ULONGLONG *); #ifdef __cplusplus -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/2119