apppublic/test/time_test.py
2021-07-13 16:14:20 +08:00

14 lines
169 B
Python

import time
def f(timeout=2):
t1 = time.time()
t = t1
t1 += timeout
while t1 > t:
print(t, t1)
time.sleep(1)
t = time.time()
if __name__ == '__main__':
f()