怎样指定程序的运行时间???谢谢
就是说,制定程序的运行时间。
比如说15秒,到了15秒自动关闭程序
2020-08-08 16:58
程序代码:import time
start = time.time()
while True:
end=time.time()
if end-start >=15 :
exit()
print(end-start)
time.sleep(1)
2020-08-08 22:06