2

I'm wondering if the windows function GetSystemTimePreciseAsFileTime use the QueryPerformanceCounter / RDTSC counter to retrieve UTC time at the sub-microseconds resolution ?

Guillaume Paris
  • 10,303
  • 14
  • 70
  • 145
  • 1
    There is a very heavy inference but no outright guarantee. Quote: "The TSC synchronization algorithm was significantly improved to better accommodate large systems with many processors. In addition, support for the new precise time-of-day API was added, which enables acquiring precise wall clock time stamps from the operating system. For more info, see GetSystemTimePreciseAsFileTime." – Hans Passant Sep 03 '15 at 14:18
  • @HansPassant Indeed, it seems to be the case so. – Guillaume Paris Sep 03 '15 at 14:40

1 Answers1

2

Internally GetSystemTimeAsPreciseFileTime does use QueryPerformanceCounter, some values from USER_SHARED_DATA, and some arithmetic to return its value.

Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219