import time


def elapsed_time(t0):
    """Given a start time (time.time() object), computes and returns elapsed
    time as a string.
    
    Keyword arguments
    =================
    :param t0: output of time.time()
        Start time to compute elapsed time from (no default)
    :return: str
        Elapsed time.
    """
    t = time.time() - t0
    if t < 60:
        t = "{:2.1f} sec.".format(t)
    elif 60 < t < 3600:
        t = "{:2.1f} min.".format(t / 60)
    else:
        t = "{:2.1f} hr.".format(t / 3600)
    
    return t