This commit is contained in:
2022-10-22 11:01:52 +08:00
commit 200117b921
105 changed files with 26944 additions and 0 deletions

View File

@ -0,0 +1,14 @@
from time import time
from functools import wraps
def timeit(func):
@wraps(func)
def _totime(*args, **kwargs):
st = time()
ans = func(*args, **kwargs)
end = time()
print("'{}' use time: {}".format(func.__name__, end - st))
return ans
return _totime