Enable periodically monitoring.
326236
def start_monitoring(self):
        
        if self.__monitoring is False:
            self.__monitoring = True
            self.__monitoring_action()
1232572
def setmonitor(self, enable=True):
        """"""
        # We must reset the monitor cache
        if enable:
            res = self.setmode('monitor')
        else:
            res = self.setmode('managed')
        if not res:
            log_runtime.error("Npcap WlanHelper returned with an error code !")
        self.cache_mode = None
        tmp = self.cache_mode = self.ismonitor()
        return tmp if enable else (not tmp)
870246
private void startActiveMonitoring(final StatusAggregator aggregator) {

    	log.info("Starting application health monitoring in ACTIVE mode");

    	ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(new ThreadFactory() {

			@Override
			public Thread newThread(Runnable r) {
				Thread t = new Thread(r,"SocketTransport App Health Monitor");
				t.setDaemon(true);
				return t;
			}
		});

    	executor.scheduleWithFixedDelay(new Runnable() {

			@Override
			public void run() {
                try {
                    boolean healthy = !Status.FAIL.equals(aggregator.getStatus());

                    setStatus(healthy ? Status.OK : Status.FAIL);
                }
                catch (Exception e) {
                    log.warn("Error whilst setting health status",e);
                }
			}
		}, monitorInterval, monitorInterval, TimeUnit.MILLISECONDS);
    }
337606
def enable(self):
        """"""
        with self._lock:
            if self.filter is None:
                self.filter = self._filter_type(self)
229123
function(connect) {
      var t = this,
          triggeredBy = t.get('triggeredBy'),
          onTrigger = t.onTrigger.bind(t);

      // Default to listen on changes to all monitors
      if (!triggeredBy) {
        for (var monitorName in t.monitors) {
          t.monitors[monitorName][connect ? 'on' : 'off']('change', t.onTrigger, t);
        }
        return;
      }

      // Process the elements in triggeredBy
      for (var name in triggeredBy) {
        var value = triggeredBy[name];

        // Construct a new cron job
        if (name === 'cron') {
          if (connect) {
            t.cronJob = new Cron.CronJob(value, onTrigger);
          }
          else {
            if (t.cronJob.initiated) {
              clearInterval(t.CronJob.timer);
            }
            else {
              setTimeout(function(){clearInterval(t.cronJob.timer);}, 1000);
            }
          }
        }

        // Set a polling interval
        else if (name === 'interval') {
          if (connect) {
            t.interval = setInterval(onTrigger, value);
          }
          else {
            clearInterval(t.interval);
            t.interval = null;
          }
        }

        // Must be a monitor name
        else {
          t.monitors[name][connect ? 'on' : 'off'](value, onTrigger);
        }
      }
    }
625389
function startCheckingArpTable() {
    setInterval(()=>{
        chkArpTable();
        for (const macinfo of Object.values(macs)) {
            pingNet(macinfo.net, macinfo.ip);
        }
    }, CHECK_ARP_TABLE_AND_PING_INTERVAL);
    // Initial check
    chkArpTable();
}
480557
async def monitor_mode(self, poll_devices=False, device=None,
                           workdir=None):
        """"""
        print("Running monitor mode")
        await self.connect(poll_devices, device, workdir)
        self.plm.monitor_mode()
108149
def enable(self):
        """"""
        ret = self.get('enable')
        if ret is None:
            return False
        else:
            return ret.lower().startswith('true')
61986
def watch_activations(self, flag):
        """"""
        lib.EnvSetDefruleWatchActivations(self._env, int(flag), self._rule)
372881
async def house_status_monitor_enable(pyvlx):
    """"""
    status_monitor_enable = HouseStatusMonitorEnable(pyvlx=pyvlx)
    await status_monitor_enable.do_api_call()
    if not status_monitor_enable.success:
        raise PyVLXException("Unable enable house status monitor.")
7277
def monitor(self, target):
        
        if 'monitor-notify' in self._capabilities and not self.is_monitoring(target):
            yield from self.rawmsg('MONITOR', '+', target)
            self._monitoring.add(target)
            return True
        else:
            return False
1007004
def update_status(self, reset=False):
        """"""
        if self.healthy_update_timer and not reset:
            return

        # get device features only once
        if not self.device_features:
            self.handle_features(self.get_features())

        # Get status from device to register/keep alive UDP
        self.handle_status()

        # Schedule next execution
        self.setup_update_timer()
588624
public void enableWatcher(TextWatcher watcher, boolean enabled){
        int index = mWatchers.indexOfValue(watcher);
        if(index >= 0){
            int key = mWatchers.keyAt(index);
            mEnabledKeys.put(key, enabled);
        }
    }
884930
def auto_subscribe(self, app_manager):
        """"""
        for handler in app_manager.handler_classes:
            app_manager.subscribe(handler.channel(), self)
782049
def enable(self):
        
        if self.enabled_start:
            warn('Duplicate "enable" call')
        else:
            self._enable()
            sys.settrace(self._global_trace)
595343
def monitor(self):
        """"""
        if self._monitor_api is None:
            self._monitor_api = self.get_monitor_api()
        return self._monitor_api
193357
def setup(self, interval):
        """"""
        self.trace_counter = 0

        self._halt = False
        self.interval = interval