Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
c9c5cecc
Commit
c9c5cecc
authored
May 19, 2015
by
Martin Storsjo
Committed by
Alexandre Julliard
May 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement GetSystemTimePreciseAsFileTime.
This just falls back to doing the same as GetSystemTimeAsFileTime.
parent
b3fe7f7c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
2 deletions
+61
-2
api-ms-win-core-sysinfo-l1-2-0.spec
...n-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec
+1
-1
api-ms-win-core-sysinfo-l1-2-1.spec
...n-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec
+1
-1
kernel32.spec
dlls/kernel32/kernel32.spec
+1
-0
time.c
dlls/kernel32/tests/time.c
+42
-0
time.c
dlls/kernel32/time.c
+15
-0
winbase.h
include/winbase.h
+1
-0
No files found.
dlls/api-ms-win-core-sysinfo-l1-2-0/api-ms-win-core-sysinfo-l1-2-0.spec
View file @
c9c5cecc
...
...
@@ -14,7 +14,7 @@
@ stdcall GetSystemTime(ptr) kernel32.GetSystemTime
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr) kernel32.GetSystemTimeAdjustment
@ stdcall GetSystemTimeAsFileTime(ptr) kernel32.GetSystemTimeAsFileTime
@ st
ub
GetSystemTimePreciseAsFileTime
@ st
dcall GetSystemTimePreciseAsFileTime(ptr) kernel32.
GetSystemTimePreciseAsFileTime
@ stdcall GetSystemWindowsDirectoryA(ptr long) kernel32.GetSystemWindowsDirectoryA
@ stdcall GetSystemWindowsDirectoryW(ptr long) kernel32.GetSystemWindowsDirectoryW
@ stdcall GetTickCount() kernel32.GetTickCount
...
...
dlls/api-ms-win-core-sysinfo-l1-2-1/api-ms-win-core-sysinfo-l1-2-1.spec
View file @
c9c5cecc
...
...
@@ -16,7 +16,7 @@
@ stdcall GetSystemTime(ptr) kernel32.GetSystemTime
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr) kernel32.GetSystemTimeAdjustment
@ stdcall GetSystemTimeAsFileTime(ptr) kernel32.GetSystemTimeAsFileTime
@ st
ub
GetSystemTimePreciseAsFileTime
@ st
dcall GetSystemTimePreciseAsFileTime(ptr) kernel32.
GetSystemTimePreciseAsFileTime
@ stdcall GetSystemWindowsDirectoryA(ptr long) kernel32.GetSystemWindowsDirectoryA
@ stdcall GetSystemWindowsDirectoryW(ptr long) kernel32.GetSystemWindowsDirectoryW
@ stdcall -ret64 GetTickCount64() kernel32.GetTickCount64
...
...
dlls/kernel32/kernel32.spec
View file @
c9c5cecc
...
...
@@ -829,6 +829,7 @@
@ stdcall GetSystemTime(ptr)
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr)
@ stdcall GetSystemTimeAsFileTime(ptr)
@ stdcall GetSystemTimePreciseAsFileTime(ptr)
@ stdcall GetSystemTimes(ptr ptr ptr)
@ stdcall GetSystemWindowsDirectoryA(ptr long)
@ stdcall GetSystemWindowsDirectoryW(ptr long)
...
...
dlls/kernel32/tests/time.c
View file @
c9c5cecc
...
...
@@ -28,6 +28,7 @@ static BOOL (WINAPI *pSystemTimeToTzSpecificLocalTime)(LPTIME_ZONE_INFORMATION,
static
int
(
WINAPI
*
pGetCalendarInfoA
)(
LCID
,
CALID
,
CALTYPE
,
LPSTR
,
int
,
LPDWORD
);
static
int
(
WINAPI
*
pGetCalendarInfoW
)(
LCID
,
CALID
,
CALTYPE
,
LPWSTR
,
int
,
LPDWORD
);
static
DWORD
(
WINAPI
*
pGetDynamicTimeZoneInformation
)(
DYNAMIC_TIME_ZONE_INFORMATION
*
);
static
void
(
WINAPI
*
pGetSystemTimePreciseAsFileTime
)(
LPFILETIME
);
#define SECSPERMIN 60
#define SECSPERDAY 86400
...
...
@@ -761,6 +762,45 @@ static void test_GetDynamicTimeZoneInformation(void)
trace
(
"Dyn TimeZoneKeyName %s
\n
"
,
wine_dbgstr_w
(
dyninfo
.
TimeZoneKeyName
));
}
static
ULONGLONG
get_longlong_time
(
FILETIME
*
time
)
{
ULARGE_INTEGER
uli
;
uli
.
LowPart
=
time
->
dwLowDateTime
;
uli
.
HighPart
=
time
->
dwHighDateTime
;
return
uli
.
QuadPart
;
}
static
void
test_GetSystemTimePreciseAsFileTime
(
void
)
{
FILETIME
ft
;
ULONGLONG
time1
,
time2
;
LONGLONG
diff
;
if
(
!
pGetSystemTimePreciseAsFileTime
)
{
win_skip
(
"GetSystemTimePreciseAsFileTime() is not supported.
\n
"
);
return
;
}
GetSystemTimeAsFileTime
(
&
ft
);
time1
=
get_longlong_time
(
&
ft
);
pGetSystemTimePreciseAsFileTime
(
&
ft
);
time2
=
get_longlong_time
(
&
ft
);
diff
=
time2
-
time1
;
if
(
diff
<
0
)
diff
=
-
diff
;
ok
(
diff
<
1000000
,
"Difference between GetSystemTimeAsFileTime and GetSystemTimePreciseAsFileTime more than 100 ms
\n
"
);
pGetSystemTimePreciseAsFileTime
(
&
ft
);
time1
=
get_longlong_time
(
&
ft
);
do
{
pGetSystemTimePreciseAsFileTime
(
&
ft
);
time2
=
get_longlong_time
(
&
ft
);
}
while
(
time2
==
time1
);
diff
=
time2
-
time1
;
ok
(
diff
<
10000
&&
diff
>
0
,
"GetSystemTimePreciseAsFileTime incremented by more than 1 ms
\n
"
);
}
START_TEST
(
time
)
{
HMODULE
hKernel
=
GetModuleHandleA
(
"kernel32"
);
...
...
@@ -769,6 +809,7 @@ START_TEST(time)
pGetCalendarInfoA
=
(
void
*
)
GetProcAddress
(
hKernel
,
"GetCalendarInfoA"
);
pGetCalendarInfoW
=
(
void
*
)
GetProcAddress
(
hKernel
,
"GetCalendarInfoW"
);
pGetDynamicTimeZoneInformation
=
(
void
*
)
GetProcAddress
(
hKernel
,
"GetDynamicTimeZoneInformation"
);
pGetSystemTimePreciseAsFileTime
=
(
void
*
)
GetProcAddress
(
hKernel
,
"GetSystemTimePreciseAsFileTime"
);
test_conversions
();
test_invalid_arg
();
...
...
@@ -779,4 +820,5 @@ START_TEST(time)
test_FileTimeToDosDateTime
();
test_GetCalendarInfo
();
test_GetDynamicTimeZoneInformation
();
test_GetSystemTimePreciseAsFileTime
();
}
dlls/kernel32/time.c
View file @
c9c5cecc
...
...
@@ -548,6 +548,21 @@ VOID WINAPI GetSystemTimeAsFileTime(
}
/***********************************************************************
* GetSystemTimePreciseAsFileTime (KERNEL32.@)
*
* Get the current time in utc format, with <1 us precision.
*
* RETURNS
* Nothing.
*/
VOID
WINAPI
GetSystemTimePreciseAsFileTime
(
LPFILETIME
time
)
/* [out] Destination for the current utc time */
{
GetSystemTimeAsFileTime
(
time
);
}
/*********************************************************************
* TIME_ClockTimeToFileTime (olorin@fandra.org, 20-Sep-1998)
*
...
...
include/winbase.h
View file @
c9c5cecc
...
...
@@ -2040,6 +2040,7 @@ WINBASEAPI BOOL WINAPI GetSystemRegistryQuota(PDWORD,PDWORD);
WINBASEAPI
VOID
WINAPI
GetSystemTime
(
LPSYSTEMTIME
);
WINBASEAPI
BOOL
WINAPI
GetSystemTimeAdjustment
(
PDWORD
,
PDWORD
,
PBOOL
);
WINBASEAPI
VOID
WINAPI
GetSystemTimeAsFileTime
(
LPFILETIME
);
WINBASEAPI
VOID
WINAPI
GetSystemTimePreciseAsFileTime
(
LPFILETIME
);
WINBASEAPI
UINT
WINAPI
GetSystemWindowsDirectoryA
(
LPSTR
,
UINT
);
WINBASEAPI
UINT
WINAPI
GetSystemWindowsDirectoryW
(
LPWSTR
,
UINT
);
#define GetSystemWindowsDirectory WINELIB_NAME_AW(GetSystemWindowsDirectory)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment