def parse_time_diff(x):
    """utility function for parsing a time difference to make it nicely readable

    Parameters
    ----------
    x : float 
        number which will be formatted
    """
    if x >= 60:
        return "{:.2f} min".format(x / 60)
    elif x < .5:
        return "{:.2f} ms".format(x * 1000)
    else:
        return "{:.2f} s".format(x)