def _get_build_time(construction_time: str) -> str: if construction_time and construction_time != '0': construction_time = int(construction_time) result = util.get_formatted_duration(construction_time, include_relative_indicator=False) return result else: return ''
def _get_duration_as_text(training_info: dict) -> str: seconds = int(training_info['Duration']) if seconds > 0: result = util.get_formatted_duration(seconds, include_relative_indicator=False) else: result = 'Instant' return result
def _get_emp_length(emp_length: str) -> str: if emp_length: emp_length_seconds = util.convert_ticks_to_seconds(int(emp_length)) result = util.get_formatted_duration(emp_length_seconds, include_relative_indicator=False) return result else: return ''
def __get_duration(training_info: entity.EntityInfo, trainings_data: entity.EntitiesData, items_data: entity.EntitiesData, researches_data: entity.EntitiesData, **kwargs) -> str: seconds = int(training_info['Duration']) if seconds: result = util.get_formatted_duration(seconds, include_relative_indicator=False) else: result = 'Instant' return result