@staticmethod
def time_to_str(time):
    """
        Convert time to formated string with the appropriate time units.
        """
    if time < 60:
        return '{:>2}sec '.format(round(time))
    elif time > 60 and time < 3600:
        return '{:>2}min '.format(round(time / 60))
    else:
        return '{:>2}h{:>2}m'.format(round(time / 3600), round(time % 3600 /
            60))
