def get_readable_time(t):
    """
    Format the time to a readable format.

    Parameters
    ----------
    t : int
        Time in ms

    Returns
    -------
    string
        The time splitted to highest used time (minutes, hours, ...)
    """
    ms = t % 1000
    t -= ms
    t /= 1000

    s = t % 60
    t -= s
    t /= 60

    minutes = t % 60
    t -= minutes
    t /= 60

    if t != 0:
        return "%ih, %i minutes %is %ims" % (t, minutes, s, ms)
    elif minutes != 0:
        return "%i minutes %is %ims" % (minutes, s, ms)
    elif s != 0:
        return "%is %ims" % (s, ms)
    else:
        return "%ims" % ms
def get_readable_time ( t ) : ms = t % 1000 t -= ms t /= 1000 s = t % 60 t -= s t /= 60 minutes = t % 60 t -= minutes t /= 60 if t != 0 : return "%ih, %i minutes %is %ims" % ( t , minutes , s , ms ) elif minutes != 0 : return "%i minutes %is %ims" % ( minutes , s , ms ) elif s != 0 : return "%is %ims" % ( s , ms ) else : return "%ims" % ms
Format the time to a readable format.

    Parameters
    ----------
    t : int
        Time in ms

    Returns
    -------
    string
        The time splitted to highest used time (minutes, hours, ...)