SyntaxFix
Write A Post
Hire A Developer
Questions
Example: a simple function call wrapper:
def measure_cpu_time(f, *args): t_start = time.process_time() ret = f(*args) t_end = time.process_time() return t_end - t_start, ret