<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On May 2, 2019, at 3:45 AM, Huw Davies <<a href="mailto:huw@codeweavers.com" class="">huw@codeweavers.com</a>> wrote:<br class=""><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><div class="">Signed-off-by: Huw Davies <<a href="mailto:huw@codeweavers.com" class="">huw@codeweavers.com</a>><br class="">---<br class=""> dlls/ntdll/ntdll.spec |  1 +<br class=""> dlls/ntdll/time.c     | 33 +++++++++++++++++++++++++++++++++<br class=""> include/winternl.h    |  1 +<br class=""> 3 files changed, 35 insertions(+)<br class=""><br class="">diff --git a/dlls/ntdll/time.c b/dlls/ntdll/time.c<br class="">index 443d8b26be..d0a7954377 100644<br class="">--- a/dlls/ntdll/time.c<br class="">+++ b/dlls/ntdll/time.c<br class="">@@ -474,6 +474,39 @@ NTSTATUS WINAPI NtQuerySystemTime( PLARGE_INTEGER Time )<br class="">     return STATUS_SUCCESS;<br class=""> }<br class=""><br class="">+/***********************************************************************<br class="">+ *       RtlGetSystemTimePrecise [NTDLL.@]<br class="">+ *<br class="">+ * Get a more accurate current system time.<br class="">+ *<br class="">+ * RETURNS<br class="">+ *   The current system time.<br class="">+ */<br class="">+LONGLONG WINAPI RtlGetSystemTimePrecise( void )<br class="">+{<br class="">+    LONGLONG time;<br class="">+<br class="">+#if defined(HAVE_CLOCK_GETTIME)<br class="">+    struct timespec ts;<br class="">+<br class="">+    if (!clock_gettime( CLOCK_REALTIME, &ts ))<br class="">+    {<br class="">+        time = ts.tv_sec * (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970;<br class="">+        time += (ts.tv_nsec + 50) / 100;<br class="">+    }<br class="">+    else<br class="">+#endif<br class=""></div></div></blockquote><div><br class=""></div><div>Using clock_gettime() on macOS is a bit problematic because of backward deployment and weak linking.  See <<a href="https://source.winehq.org/git/wine.git/commit/27c71e09ad51ba6aa672a46379efd10b5959863f" class="">https://source.winehq.org/git/wine.git/commit/27c71e09ad51ba6aa672a46379efd10b5959863f</a>>, although that's not necessarily my preferred approach.  (I wanted to check if it was available at run-time and use it, if so.  Alexandre didn't like that.)</div><div><br class=""></div><div>-Ken</div><div><br class=""></div></div></body></html>