def updateBatteryConsumption(self, consumption):
    with self.lock:
        self.batteryConsumption = consumption
        self.lastMessageTime = float(time.time())
def updateBatteryConsumption(self, consumption):
    with self.lock:
        self.batteryConsumption = consumption
        self.lastMessageTime = float(time.time())