def __periodicNetworkCheck(self):
    threading.Timer(NETWORK_PERIODIC_CHECK_INTERVAL, self.__periodicNetworkCheck).start()
    nodes_removed = False
    for n in self.__nodes:
        if ((n.getLastMessageElapsedTime() > NODE_TIMEOUT_S) and n.online):
            if (printVerbosity > 2):
                self.addPrint(((('[APPLICATION] Node ' + n.name) + (' timed out. Elasped time: %.2f' % n.getLastMessageElapsedTime())) + ' Removing it from the network.'))
            n.online = False
            nodes_removed = True
    if nodes_removed:
        self.__trickleCheck()
        self.printNetworkStatus()
def __periodicNetworkCheck(self):
    threading.Timer(NETWORK_PERIODIC_CHECK_INTERVAL, self.__periodicNetworkCheck).start()
    nodes_removed = False
    for n in self.__nodes:
        if ((n.getLastMessageElapsedTime() > NODE_TIMEOUT_S) and n.online):
            if (printVerbosity > 2):
                self.addPrint(((('[APPLICATION] Node ' + n.name) + (' timed out. Elasped time: %.2f' % n.getLastMessageElapsedTime())) + ' Removing it from the network.'))
            n.online = False
            nodes_removed = True
    if nodes_removed:
        self.__trickleCheck()
        self.printNetworkStatus()