cmind.utils.decorators

Function decorators

Functions

cmind_timer(func[, print_time, logger]) decorator to print elapsed time to run a function
cmind.utils.decorators.cmind_timer(func, print_time=True, logger=None)[source]

decorator to print elapsed time to run a function

Parameters:

func : function to time

print_time : bool, optional

if true print out the elapsed time with either logger or print

logger : logging.Logger, optional

logger to print timing information to

Returns:

wrapper : function wrapped with timing printouts