[SERVER-15146] Use GetSystemTimePreciseAsFileTime on Windows where possible Created: 04/Sep/14  Updated: 06/Feb/15  Resolved: 10/Sep/14

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: 2.7.5
Fix Version/s: 2.7.7

Type: Bug Priority: Major - P3
Reporter: Mark Benvenuto Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: community-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: Windows
Sprint: Server 2.7.6
Participants:

 Description   

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



 Comments   
Comment by Githook User [ 10/Sep/14 ]

Author:

{u'username': u'markbenvenuto', u'name': u'Mark Benvenuto', u'email': u'mark.benvenuto@mongodb.com'}

Message: SERVER-15146: Use GetSystemTimePreciseAsFileTime where possible
Branch: master
https://github.com/mongodb/mongo/commit/621766db5fcc26cf4955ffd8d3733e99a41bb17f

Generated at Thu Feb 08 03:37:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.