Based on a staging patch from Michael Müller michael@fds-team.de
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/ntdll/thread.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 6f700e3e9d7..995088be36b 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -313,15 +313,25 @@ TEB *thread_init(void) */ void user_shared_data_update() { + ULARGE_INTEGER interrupt; LARGE_INTEGER now;
NtQuerySystemTime( &now ); - user_shared_data->SystemTime.LowPart = now.u.LowPart; - user_shared_data->SystemTime.High1Time = user_shared_data->SystemTime.High2Time = now.u.HighPart; - user_shared_data->u.TickCountQuad = (now.QuadPart - server_start_time) / 10000; - user_shared_data->u.TickCount.High2Time = user_shared_data->u.TickCount.High1Time; - user_shared_data->TickCountLowDeprecated = user_shared_data->u.TickCount.LowPart; - user_shared_data->TickCountMultiplier = 1 << 24; + user_shared_data->SystemTime.High2Time = now.u.HighPart; + user_shared_data->SystemTime.LowPart = now.u.LowPart; + user_shared_data->SystemTime.High1Time = now.u.HighPart; + + RtlQueryUnbiasedInterruptTime( &interrupt.QuadPart ); + user_shared_data->InterruptTime.High2Time = interrupt.HighPart; + user_shared_data->InterruptTime.LowPart = interrupt.LowPart; + user_shared_data->InterruptTime.High1Time = interrupt.HighPart; + + interrupt.QuadPart /= 10000; + user_shared_data->u.TickCount.High2Time = interrupt.HighPart; + user_shared_data->u.TickCount.LowPart = interrupt.LowPart; + user_shared_data->u.TickCount.High1Time = interrupt.HighPart; + user_shared_data->TickCountLowDeprecated = interrupt.LowPart; + user_shared_data->TickCountMultiplier = 1 << 24; }