ersa_utils.py
def timer_decorator(func):
    """
    This is a decorator to print out running time of executing func
    :param func:
    :return:
    """
    @wraps(func)
    def timer_wrapper(*args, **kwargs):
        start_time = time.time()
        func(*args, **kwargs)
        duration = time.time() - start_time
        print('duration: {:.3f}s'.format(duration))
    return timer_wrapper

    This is a decorator to print out running time of executing func
    :param func:
    :return:
    
This is a decorator to print out running time of executing func
This is a decorator to print out running time of executing func
def timer_decorator(func):
    @wraps(func)
    def timer_wrapper(*args, **kwargs):
        start_time = time.time()
        func(*args, **kwargs)
        duration = time.time() - start_time
        print('duration: {:.3f}s'.format(duration))
    return timer_wrapper
def timer_decorator ( func ) : @ wraps ( func ) def timer_wrapper ( * args , ** kwargs ) : start_time = time . time ( ) func ( * args , ** kwargs ) duration = time . time ( ) - start_time print ( 'duration: {:.3f}s' . format ( duration ) ) return timer_wrapper
This is a decorator to print out running time of executing func
This is a decorator to print out running time of executing func
"""
    This is a decorator to print out running time of executing func
    :param func:
    :return:
    """
None
func
None