def getDestroyingTimeLeft(self): if self.finishTime is not None: destroyTimeDelta = time_utils.getTimestampFromNow(self.finishTime) if destroyTimeDelta <= CompanyBattles.DELTA: return 0 return destroyTimeDelta return self.finishTime
def getCreationTimeLeft(self): if self.startTime is not None: startTimeDelta = time_utils.getTimestampFromNow(self.startTime) if startTimeDelta <= CompanyBattles.DELTA: return 0 return startTimeDelta return self.startTime