Commit 9183e584 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp110: Add _Xtime_get_ticks implementation.

parent d5fd04f2
......@@ -3891,7 +3891,7 @@
@ stub _Xp_subx
@ stub _Xtime_diff_to_millis
@ stub _Xtime_diff_to_millis2
@ stub _Xtime_get_ticks
@ cdecl _Xtime_get_ticks()
@ stub __Wcrtomb_lk
# extern _Zero
@ cdecl towctrans(long long)
......
......@@ -28,6 +28,12 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(msvcp);
#define SECSPERDAY 86400
/* 1601 to 1970 is 369 years plus 89 leap days */
#define SECS_1601_TO_1970 ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY)
#define TICKSPERSEC 10000000
#define TICKS_1601_TO_1970 (SECS_1601_TO_1970 * TICKSPERSEC)
struct __Container_proxy;
typedef struct {
......@@ -343,3 +349,14 @@ void __thiscall _Container_base12__Swap_all(
if(that->proxy)
that->proxy->cont = that;
}
/* _Xtime_get_ticks */
LONGLONG __cdecl _Xtime_get_ticks(void)
{
FILETIME ft;
TRACE("\n");
GetSystemTimeAsFileTime(&ft);
return ((LONGLONG)ft.dwHighDateTime<<32) + ft.dwLowDateTime - TICKS_1601_TO_1970;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment