Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (8 sloc) 186 Bytes
import time
def report_time(func):
def wrapper(*args, **kwargs):
now = time.time()
ret = func(*args, **kwargs)
difftime = time.time() - now
return ret, difftime
return wrapper