r357413 changes a invocation of "QueryPerformanceCounter" to instead call "QueryPerformanceFrequency" (note Counter vs. Frequency). Seems like a mistake?
r357413 changes a invocation of "QueryPerformanceCounter" to instead call
"QueryPerformanceFrequency" (note Counter vs. Frequency). Seems like a
mistake?
Extended Description
Method implementation is:
And seems like there is a race condition on
freq
andinitialized
variables ifsteady_clock::now
has never been called before new threads creation.Possible fixes are:
use thread local storage for
freq
andinitialized
, but there might be some problems on Windows XP:https://reverseengineering.stackexchange.com/questions/14171/thread-local-storage-access-on-windows-xp
use
std::call_once
guard, but it is slightly slower than thread local due to atomic access.The text was updated successfully, but these errors were encountered: