Пример #1
0
        private void OnUpdate(object o)
        {
            lock (nameList)
                foreach (Name name in nameList)
                {
                    Request(name, HeaderOpcode.Refresh);
                }

            updateTimer.Change(NAME_UPDATE_INTERVAL_MS, Timeout.Infinite);
        }
Пример #2
0
 public void Reset()
 {
     if (null == _timer)
     {
         throw new ArgumentException("Cannot reset a non-running watchdog");
     }
     _timer.Change(_duration, _duration);
     //Debug.Print("Watchdog reset");
 }
Пример #3
0
 public void TurnOn(int duration)
 {
     _port.Write(true);
     _timer.Change(duration, 0);
 }