import time, random # decorator function def my_timer(func): def wrapper(*args, **kwargs): print("my_timer call") start = time.time() result = func(*args, **kwargs) print("my_timer result:", time.time()-start) return result return wrapper def print_something_decorator(func): def wrapper(*args, **kwargs): print("print_something_decorator call") return func(*args, **kwargs) return wrapper @my_timer @print_something_decorator def get_all_files(root_folder): print("Listing all files in", root_folder) time.sleep( random.randint(2,10) ) print("Data ready!") get_all_files("c:/temp/photos")