kernel32: Implemented GetTickCount64.
diff --git a/dlls/kernel32/kernel_main.c b/dlls/kernel32/kernel_main.c
index 5e72cee..846f787 100644
--- a/dlls/kernel32/kernel_main.c
+++ b/dlls/kernel32/kernel_main.c
@@ -46,6 +46,8 @@
extern int __wine_set_signal_handler(unsigned, int (*)(unsigned));
+static ULONGLONG server_start_time;
+
/***********************************************************************
* KERNEL thread initialisation routine
*/
@@ -112,12 +114,16 @@
static BOOL process_attach( HMODULE module )
{
SYSTEM_INFO si;
+ SYSTEM_TIMEOFDAY_INFORMATION ti;
RTL_USER_PROCESS_PARAMETERS *params = NtCurrentTeb()->Peb->ProcessParameters;
/* FIXME: should probably be done in ntdll */
GetSystemInfo( &si );
NtCurrentTeb()->Peb->NumberOfProcessors = si.dwNumberOfProcessors;
+ NtQuerySystemInformation( SystemTimeOfDayInformation, &ti, sizeof(ti), NULL );
+ server_start_time = ti.liKeBootTime.QuadPart;
+
/* Setup registry locale information */
LOCALE_InitRegistry();
@@ -236,6 +242,18 @@
}
+/******************************************************************************
+ * GetTickCount64 (KERNEL32.@)
+ */
+ULONGLONG WINAPI GetTickCount64(void)
+{
+ LARGE_INTEGER now;
+
+ NtQuerySystemTime( &now );
+ return (now.QuadPart - server_start_time) / 10000;
+}
+
+
/***********************************************************************
* GetTickCount (KERNEL32.@)
*
@@ -254,5 +272,5 @@
*/
DWORD WINAPI GetTickCount(void)
{
- return NtGetTickCount();
+ return GetTickCount64();
}