RESOLVED FIXED Bug 27848
[WINCE] allow using old GetTickCount implementation of currentTime
https://bugs.webkit.org/show_bug.cgi?id=27848
Summary [WINCE] allow using old GetTickCount implementation of currentTime
Joe Mason
Reported 2009-07-30 12:04:33 PDT
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.
Attachments
patch to CurrentTime.cpp (3.99 KB, patch)
2009-07-30 12:10 PDT, Joe Mason
staikos: review+
same patch, updated changelog (4.25 KB, patch)
2009-07-30 12:42 PDT, Joe Mason
no flags
Joe Mason
Comment 1 2009-07-30 12:10:06 PDT
Created attachment 33802 [details] patch to CurrentTime.cpp
George Staikos
Comment 2 2009-07-30 12:22:13 PDT
Comment on attachment 33802 [details] patch to CurrentTime.cpp Looks good to me. Needed for WinCE, could also be useful elsewhere.
Joe Mason
Comment 3 2009-07-30 12:29:15 PDT
The changelog on this patch is wrong - missed giving author credit to Yong.
Yong Li
Comment 4 2009-07-30 12:31:05 PDT
#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
Joe Mason
Comment 5 2009-07-30 12:42:59 PDT
Created attachment 33805 [details] same patch, updated changelog
Joe Mason
Comment 6 2009-07-30 12:45:28 PDT
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.
Adam Barth
Comment 7 2009-07-31 21:44:22 PDT
Will land.
Adam Barth
Comment 8 2009-07-31 22:26:19 PDT
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
Adam Barth
Comment 9 2009-07-31 22:26:23 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.