Switches from GetSystemTime on Windows to QueryPerformanceCounter in scheduler and related drmemtrace code. GetSystemTime was returning times that did not have microsecond granularity, causing problems with identical timestamps. QueryPerformanceCounter is not an absolute time but none of the use cases need that: they just need relative orderings.
Tested on a Windows machine where GetSystemTime returned the same value repeatedly in the test_random_schedule() test from PR #6639:
5: time is 133518165841993473
5: time is 133518165841993473
5: time is 133518165841993473
5: time is 133518165841993473
While QueryPerformanceCounter changes:
5: time is 3353910786292
5: time is 3353910787556
5: time is 3353910810719
5: time is 3353910811957
Switches from GetSystemTime on Windows to QueryPerformanceCounter in scheduler and related drmemtrace code. GetSystemTime was returning times that did not have microsecond granularity, causing problems with identical timestamps. QueryPerformanceCounter is not an absolute time but none of the use cases need that: they just need relative orderings.
Tested on a Windows machine where GetSystemTime returned the same value repeatedly in the test_random_schedule() test from PR #6639:
While QueryPerformanceCounter changes:
Fixes #6640