Signed-off-by: Huw Davies <
huw@codeweavers.com>
---
dlls/ntdll/ntdll.spec | 1 +
dlls/ntdll/time.c | 33 +++++++++++++++++++++++++++++++++
include/winternl.h | 1 +
3 files changed, 35 insertions(+)
diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c
index 443d8b26be..d0a7954377 100644
--- a/dlls/ntdll/time.c
+++ b/dlls/ntdll/time.c
@@ -474,6 +474,39 @@ NTSTATUS WINAPI NtQuerySystemTime( PLARGE_INTEGER Time )
return STATUS_SUCCESS;
}
+/***********************************************************************
+ * RtlGetSystemTimePrecise [NTDLL.@]
+ *
+ * Get a more accurate current system time.
+ *
+ * RETURNS
+ * The current system time.
+ */
+LONGLONG WINAPI RtlGetSystemTimePrecise( void )
+{
+ LONGLONG time;
+
+#if defined(HAVE_CLOCK_GETTIME)
+ struct timespec ts;
+
+ if (!clock_gettime( CLOCK_REALTIME, &ts ))
+ {
+ time = ts.tv_sec * (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970;
+ time += (ts.tv_nsec + 50) / 100;
+ }
+ else
+#endif