Opc.Ua.Com.Server.ComDaGroup.CheckUpdateTimerStatus C# (CSharp) Method

CheckUpdateTimerStatus() private method

Checks the update timer status.
private CheckUpdateTimerStatus ( ) : void
return void
        private void CheckUpdateTimerStatus()
        {
            lock (m_lock)
            {
                if (AreUpdatesRequired)
                {
                    if (m_nextUpdateTime == -1)
                    {
                        ScheduleNextUpdate();
                    }

                    // check if it needs to be started.
                    if (m_updateTimer == null)
                    {
                        // mark all of the cached values for re sending.
                        for (int ii = 0; ii < m_items.Count; ii++)
                        {
                            if (m_items[ii].CacheEntry != null)
                            {
                                m_items[ii].CacheEntry.Changed = true;
                            }
                        }

                        m_updateTimer = new Timer(OnUpdate, null, 0, 50);
                    }

                    return;
                }

                // check if the timer needs to stopped.
                if (m_updateTimer != null)
                {
                    m_updateTimer.Dispose();
                    m_updateTimer = null;
                }

                m_nextUpdateTime = -1;
            }
        }