def time_fmt(secs):
    """
    Return a string representing the number of seconds, in a human readable
    unit.
    """
    if secs < 120:
        return "{}s".format(int(secs))
    if secs < 3600:
        return "{}m".format(secs // 60)
    return "{}h".format(secs // 3600)