def display_time(time):
    """ converts a time given in seconds to a readable formatted string

    :param time: time in seconds
    :return: time string
    """

    if time < 60:
        return str(int(round(time))) + "s"
    elif time < 3600:
        return str(int(time / 60)) + "m " + \
               str(int(round(time % 60))) + "s"
    else:
        return str(int(time / 3600)) + "h " + \
               str(int(round((time % 3600) / 60))) + "m"