def pretty_time(dt):
    """
    Returns a human readable string for a time duration in seconds.
    :param dt: duration in seconds
    """
    if dt > 3600:
        hours = dt / 3600.
        if hours > 9:
            return '%dh' % (int(hours))
        minutes = 60 * (hours - int(hours))
        return '%dh%2dm' % (int(hours), int(minutes))
    elif dt > 60:
        minutes = dt / 60.
        if minutes > 9.5:
            return '%dm' % (int(minutes))
        seconds = 60 * (minutes - int(minutes))
        return '%dm%2ds' % (int(minutes), int(seconds))
    elif dt > 10:
        return '%ds' % (int(dt))
    elif dt > 0.05:
        return '%4.1fs' % dt
    else:
        return '-'