I'm not sure if this is the correct area, so I apologize, anyways, I'm new to learning python, for the past 2 days I've been looking for an answer to this. I want to add code that can make it so it pauses the script (not ending it) and then at an exact time it will run the few lines below it. Such as if I wanted it to pause it until 10:40 pm, I need it to be accurate to the very millisecond. Example: 2021 2 21 22 40 00 00 Year month day hour minute(s) second(s) millisecond(s)
The closest code to it that I got didn't do it accurately and most of the time had a second or more delay.
---The code
I put the rest of my code here.
The closest code to it that I got didn't do it accurately and most of the time had a second or more delay.
---The code
import sched import time as time_module def myfunc(): print("test123") scheduler = sched.scheduler(time_module.time, time_module.sleep) t = time_module.strptime('2021-02-21 22:25:14', '%Y-%m-%d %H:%M:%S') t = time_module.mktime(t) scheduler_e = scheduler.enterabs(t, 1, myfunc, ()) scheduler.run()---
I put the rest of my code here.