'''
Author: Li Ji
Date: 2022-05-24 11:06:07
LastEditTime: 2022-05-24 11:06:34
Description:
Software:VSCode,env:
'''
from time import time
def time_costing(func):
def core():
start = time()
func()
print('time costing:', time() - start)
return core
@time_costing
def run():
res = 0
for i in range(10000):
for j in range(10000):
res += 1
res -= 1
if __name__ == '__main__':
run()
06-11
1715
04-03
3650
03-16
3400