The QueryPerformanceCounter implementation of currentTime has a few problems: despite the workarounds, the clock still occasionally goes backwards (I suspect the 2 sec threshold is too small), and using timeBeginPeriod/timeEndPeriod can affect system performance by changing the frequency of the scheduler. This patch lets you choose the older implementation, despite the lower resolution, by setting WTF_USE_QUERY_PERFORMANCE_COUNTER to 0.
Created attachment 33802 [details] patch to CurrentTime.cpp
Comment on attachment 33802 [details] patch to CurrentTime.cpp Looks good to me. Needed for WinCE, could also be useful elsewhere.
The changelog on this patch is wrong - missed giving author credit to Yong.
#if PLATFORM(WIN_OS) 343 #define WTF_USE_QUERY_PERFORMANCE_COUNTER 1 344 #endif how about adding #ifndef WTF_USE_QUERY_PERFORMANCE_COUNTER here? so that it won't overwrite the one in project settings if any
Created attachment 33805 [details] same patch, updated changelog
I just have it redefined later in our local copy of Platform.h. I prefer having all symbols like this in Platform.h anyway instead of hidden in project files.
Will land.
Comment on attachment 33805 [details] same patch, updated changelog Clearing review flag on attachment: 33805 Committing to http://svn.webkit.org/repository/webkit/trunk ... M JavaScriptCore/ChangeLog M JavaScriptCore/wtf/CurrentTime.cpp M JavaScriptCore/wtf/Platform.h Committed r46660 M JavaScriptCore/wtf/Platform.h M JavaScriptCore/wtf/CurrentTime.cpp M JavaScriptCore/ChangeLog r46660 = f50ff91bb2c8f9f99fb86c09814c0551acd967b3 (trunk) No changes between current HEAD and refs/remotes/trunk Resetting to the latest refs/remotes/trunk http://trac.webkit.org/changeset/46660
All reviewed patches have been landed. Closing bug.