Changeset 163536 in webkit
- Timestamp:
- Feb 6, 2014 9:03:16 AM (10 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r163519 r163536 1 2014-02-06 Anders Carlsson <andersca@apple.com> 2 3 Use std::chrono functions in dispatchFunctionsFromMainThread() 4 https://bugs.webkit.org/show_bug.cgi?id=128308 5 6 Reviewed by Antti Koivisto. 7 8 * wtf/MainThread.cpp: 9 (WTF::dispatchFunctionsFromMainThread): 10 1 11 2014-02-05 Zan Dobersek <zdobersek@igalia.com> 2 12 -
trunk/Source/WTF/wtf/MainThread.cpp
r163288 r163536 143 143 144 144 // 0.1 sec delays in UI is approximate threshold when they become noticeable. Have a limit that's half of that. 145 static const double maxRunLoopSuspensionTime = 0.05;145 static const auto maxRunLoopSuspensionTime = std::chrono::milliseconds(50); 146 146 147 147 void dispatchFunctionsFromMainThread() … … 152 152 return; 153 153 154 double startTime = monotonicallyIncreasingTime();154 auto startTime = std::chrono::steady_clock::now(); 155 155 156 156 FunctionWithContext invocation; … … 169 169 // This code has effect only in case the scheduleDispatchFunctionsOnMainThread() is implemented in a way that 170 170 // allows input events to be processed before we are back here. 171 if ( monotonicallyIncreasingTime() - startTime > maxRunLoopSuspensionTime) {171 if (std::chrono::steady_clock::now() - startTime > maxRunLoopSuspensionTime) { 172 172 scheduleDispatchFunctionsOnMainThread(); 173 173 break;
Note: See TracChangeset
for help on using the changeset viewer.