Use GetSystemTimePreciseAsFileTime on Windows where possible

XMLWordPrintableJSON

    • Fully Compatible
    • Windows
    • Server 2.7.6
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In time_support.cpp on Windows, we emulate the precision of gettimeofday by a combination of GetSystemTimeAsFileTime & QueryPerformanceCounter with our own addition locking. Windows 8 and later offer a new function that we can use instead to get more accurate timing information without the overhead of our own locking.

      From http://msdn.microsoft.com/en-us/library/windows/desktop/hh706895%28v=vs.85%29.aspx

      The GetSystemTimePreciseAsFileTime function retrieves the current system date and time with the highest possible level of precision (<1us). The retrieved information is in Coordinated Universal Time (UTC) format.

      See also http://msdn.microsoft.com/en-us/library/windows/desktop/dn553408%28v=vs.85%29.aspx

              Assignee:
              Mark Benvenuto
              Reporter:
              Mark Benvenuto
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: