Update example_of_timer.py

This commit is contained in:
guanjihuan 2025-03-24 18:07:24 +08:00
parent 1a5d874ac0
commit 388be36ab1

View File

@ -5,11 +5,11 @@ import guan
def test1(a, b): def test1(a, b):
import time import time
print(a) print(a)
time.sleep(2) time.sleep(1)
print(b) print(b)
print('Run finished.') print('Run finished.')
for _ in range(3): for _ in range(2):
test1(10, b=20) test1(10, b=20)
print() print()
@ -17,9 +17,9 @@ print()
def test2(a, b): def test2(a, b):
import time import time
print(a) print(a)
time.sleep(2) time.sleep(1)
print(b) print(b)
print('Run finished.') print('Run finished.')
for _ in range(3): for _ in range(2):
guan.timer(test2, 10, b=20) guan.timer(test2, 100, b=200)