def format_time(seconds):
    v = seconds

    if v * 1000 * 1000 * 1000 < 1000:
        scale = u'ns'
        v = int(round(v*1000*1000*1000))
    elif v * 1000 * 1000 < 1000:
        scale = u'μs'
        v = int(round(v*1000*1000))
    elif v * 1000 < 1000:
        scale = u'ms'
        v = round(v*1000, 4)
    else:
        scale = u'sec'
        v = int(v)

    return u'{} {}'.format(v, scale)