为什么程序没有在给定的预定时间执行?

时间:2016-11-20 17:17:28

标签: python python-3.x datetime

import time,datetime

startTime = datetime.datetime(2016, 11, 20, 23, 0, 0)
while datetime.datetime.now() < startTime:       
    time.sleep(1)

print('Program now starting on 20 NOV 2016 @ 23:00')

0 个答案:

没有答案