Returns the charge time elapsed (in seconds), or 0 if is not currently charging

def getChargeTimeElapsed(self):
    """Returns the charge time elapsed (in seconds), or 0 if is not currently charging"""
    command = '$GS'
    status = self.sendCommand(command)
    if int(status[1]) == 3:
      return int(status[2])
    else:
      return 0