Huw Davies : kernel32: Implement GetSystemTimePreciseAsFileTime() using RtlGetSystemTimePrecise().

Alexandre Julliard julliard at winehq.org
Tue May 14 15:43:03 CDT 2019


Module: wine
Branch: master
Commit: 074b7d9d097ac6cbbcbb272300b57f6ff334eb4a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=074b7d9d097ac6cbbcbb272300b57f6ff334eb4a

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue May 14 09:53:43 2019 +0100

kernel32: Implement GetSystemTimePreciseAsFileTime() using RtlGetSystemTimePrecise().

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/time.c | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/dlls/kernel32/time.c b/dlls/kernel32/time.c
index 256cd62..4174289 100644
--- a/dlls/kernel32/time.c
+++ b/dlls/kernel32/time.c
@@ -754,13 +754,16 @@ BOOL WINAPI TzSpecificLocalTimeToSystemTime(
  *
  *  Get the current time in utc format.
  *
+ *  PARAMS
+ *   time [out] Destination for the current utc time
+ *
  *  RETURNS
  *   Nothing.
  */
-VOID WINAPI GetSystemTimeAsFileTime(
-    LPFILETIME time) /* [out] Destination for the current utc time */
+void WINAPI GetSystemTimeAsFileTime( FILETIME *time )
 {
     LARGE_INTEGER t;
+
     NtQuerySystemTime( &t );
     time->dwLowDateTime = t.u.LowPart;
     time->dwHighDateTime = t.u.HighPart;
@@ -770,15 +773,21 @@ VOID WINAPI GetSystemTimeAsFileTime(
 /***********************************************************************
  *              GetSystemTimePreciseAsFileTime  (KERNEL32.@)
  *
- *  Get the current time in utc format, with <1 us precision.
+ *  Get the current time in utc format with greater accuracy.
+ *
+ *  PARAMS
+ *   time [out] Destination for the current utc time
  *
  *  RETURNS
  *   Nothing.
  */
-VOID WINAPI GetSystemTimePreciseAsFileTime(
-    LPFILETIME time) /* [out] Destination for the current utc time */
+void WINAPI GetSystemTimePreciseAsFileTime( FILETIME *time )
 {
-    GetSystemTimeAsFileTime(time);
+    LARGE_INTEGER t;
+
+    t.QuadPart = RtlGetSystemTimePrecise();
+    time->dwLowDateTime = t.u.LowPart;
+    time->dwHighDateTime = t.u.HighPart;
 }
 
 




More information about the wine-cvs mailing list