import time def timeit(func): def wrapper(*args, **kwargs): start_time = time.time() result = func(*args, **kwargs) end_time = time.time() execution_time = round(end_time - start_time, 2) print(f"{func.__name__} took {execution_time} seconds.") return result return wrapper