python 通关sleep函数等待到明天再执行

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

python 通关sleep函数等待到明天再执行
def waitToTomorrow():
    """Wait to tommorow 00:00 am"""
  
    tomorrow = datetime.datetime.replace(datetime.datetime.now() + datetime.timedelta(days=1),
                         hour=0, minute=0, second=0)
    delta = tomorrow - datetime.datetime.now()
    time.sleep(delta.seconds)