code: 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
docs: Return Icinga's uptime