Source/platform/ThreadTimers.cpp
// A worker thread may initialize SharedTimer after some timers are created.
// Also, SharedTimer can be replaced with 0 before all timers are destroyed.
A worker thread may initialize SharedTimer after some timers are created.
Also, SharedTimer can be replaced with 0 before all timers are destroyed.
A worker thread may initialize SharedTimer after some timers are created . Also SharedTimer can be replaced with 0 before all timers are destroyed .
void ThreadTimers::setSharedTimer(SharedTimer* sharedTimer)
{
    if (m_sharedTimer) {
        m_sharedTimer->setFiredFunction(0);
        m_sharedTimer->stop();
        m_pendingSharedTimerFireTime = 0;
    }
    m_sharedTimer = sharedTimer;
    if (sharedTimer) {
        m_sharedTimer->setFiredFunction(ThreadTimers::sharedTimerFired);
        updateSharedTimer();
    }
}
void ThreadTimers :: setSharedTimer ( SharedTimer * sharedTimer ) { if ( m_sharedTimer ) { m_sharedTimer -> setFiredFunction ( 0 ) ; m_sharedTimer -> stop ( ) ; m_pendingSharedTimerFireTime = 0 ; } m_sharedTimer = sharedTimer ; if ( sharedTimer ) { m_sharedTimer -> setFiredFunction ( ThreadTimers :: sharedTimerFired ) ; updateSharedTimer ( ) ; } }
A worker thread may initialize SharedTimer after some timers are created.
A worker thread may initialize SharedTimer after some timers are created .