import time


def timefunc(func):
    """
    decorator to measure the execution time of the decorated function.
    """
    def profiled_func(*args, **kwargs):
        start = time.time()
        result = func(*args, **kwargs)
        end = time.time()
        print(func.__name__, 'took', end - start, 'time')
        return result
    return profiled_func