[PATCH 3/4] ntdll: Update user_shared_data InterruptTime fields when updating time.
Rémi Bernon
rbernon at codeweavers.com
Fri Nov 29 03:24:00 CST 2019
Based on a staging patch from Michael Müller <michael at fds-team.de>
Signed-off-by: Rémi Bernon <rbernon at 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;
}
--
2.24.0
More information about the wine-devel
mailing list