apppublic/test/time_test.py
2023-02-23 15:17:24 +08:00

14 lines
169 B
Python
Executable File

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()