def human_readable_time(time):
    """
    HUMAN_READABLE_TIME convert a time ns, us, ms depending on its value

    Paramaters
    ----------
    time (float) :
        time value
    
    Returns
    -------
    time (float):
        time value converted
    units (str):
        unit of measurement

    AUTHOR: Luca Giaccone (luca.giaccone@polito.it)
    DATE: 11.08.2018
    HISTORY:
    """
    if time < 1e-09:
        time = time * 1000000.0
        unit = 'ns'
    elif time < 1e-06:
        time = time * 1000000.0
        unit = 'us'
    elif time < 0.001:
        time = time * 1000.0
        unit = 'ms'
    else:
        unit = 's'
    return time, unit
