import time
import functools
import inspect


# for class method checking
def print_running_time(f):
    @functools.wraps(f)
    def wrapper(*arg, **kwargs):
        # get signature of function
        t = time.clock()
        response = f(*arg, **kwargs)
        return response

    return wrapper


def print_signature(f):
    @functools.wraps(f)
    def wrapper(*arg, **kwargs):
        f_args = inspect.getcallargs(f, *arg, **kwargs)
        print("signature : " + str(f_args))
        return f(*arg, **kwargs)

    return wrapper
