This commit is contained in:
2025-03-20 05:29:42 +08:00
parent ede8d08443
commit 2bb0a1ab9b
2 changed files with 39 additions and 3 deletions

View File

@@ -2,10 +2,24 @@
import guan
@guan.timer_decorator
def my_function():
def test1(a, b):
import time
print(a)
time.sleep(2)
print('Run finished')
print(b)
print('Run finished.')
for _ in range(3):
my_function()
test1(10, b=20)
print()
def test2(a, b):
import time
print(a)
time.sleep(2)
print(b)
print('Run finished.')
for _ in range(3):
guan.timer(test2, 10, b=20)