基于时间的间隔操作(python)
import time
while 1:
x = int(time.strftime('%S',time.localtime(time.time())))
print(x,type(x))
time.sleep(1)
if divmod(x,10)[1]==0:
print('你要做的事情')
import time
while 1:
x = int(time.strftime('%S',time.localtime(time.time())))
print(x,type(x))
time.sleep(1)
if divmod(x,10)[1]==0:
print('你要做的事情')