Start using MonotonicTime / Seconds in Timer class.
Created attachment 306546 [details] Patch
Comment on attachment 306546 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=306546&action=review > Source/WebCore/page/SuspendableTimer.cpp:118 > + m_savedRepeatInterval = Seconds { 0 }; 0_s > Source/WebCore/page/SuspendableTimer.cpp:128 > return 0; Why not change this function to return a Seconds? > Source/WebCore/page/SuspendableTimer.cpp:140 > + m_savedRepeatInterval = Seconds { 0 }; 0_s > Source/WebCore/platform/ThreadTimers.cpp:46 > +static const Seconds maxDurationOfFiringTimers { 0.050 }; 50_ms > Source/WebCore/platform/ThreadTimers.cpp:92 > + m_sharedTimer->setFireInterval(std::max(nextFireTime - currentMonotonicTime, Seconds { })); 0_s > Source/WebCore/platform/ThreadTimers.cpp:122 > + if (!m_firingTimers || timeToQuit < MonotonicTime::now()) > break; Should we capture MonotonicTime::now() outside the loop? > Source/WebCore/platform/Timer.cpp:216 > + m_repeatInterval = Seconds { }; 0_s > Source/WebCore/platform/Timer.cpp:220 > + ASSERT(m_repeatInterval == Seconds { 0 }); 0_s > Source/WebCore/platform/Timer.cpp:224 > double TimerBase::nextFireInterval() const Return a Seconds? > Source/WebCore/platform/Timer.cpp:416 > + return std::max(m_unalignedNextFireTime - MonotonicTime::now(), Seconds { 0 }); 0_s > Source/WebCore/platform/Timer.h:68 > + void startOneShot(Seconds interval) { start(interval, Seconds { 0 }); } 0_s
Will update the return values in a follow-up patch to keep patch size small.
Created attachment 306551 [details] Patch
Comment on attachment 306551 [details] Patch Clearing flags on attachment: 306551 Committed r215136: <http://trac.webkit.org/changeset/215136>
All reviewed patches have been landed. Closing bug.