(self, app_stats)
return uptime
Return Icinga's uptime
Return Icinga's uptime
Return Icinga s uptime
def _get_uptime(self, app_stats):
        """ Return Icinga's uptime """
        if "program_start" not in app_stats.keys():
            return 0

        if not app_stats["program_start"].isdigit():
            return 0

        uptime = int(time.time()) - int(app_stats["program_start"])
        if uptime < 0:
            return 0

        return uptime
def _get_uptime ( self , app_stats ) : if "program_start" not in app_stats . keys ( ) : return 0 if not app_stats [ "program_start" ] . isdigit ( ) : return 0 uptime = int ( time . time ( ) ) - int ( app_stats [ "program_start" ] ) if uptime < 0 : return 0 return uptime