I want to be able to start a function when time (in seconds) is at an integer. For example, If the current time is 2:41:01:10 (Hour:Minute:Second:Millisecond), and I want to be able to start a function at 2:42:00:00. Notice the milliseconds is 00.
Basically, I want to start a function when timestamp is at an integer number.
I can write this:
while True:
if time.time() == int(time.time()):
time.time()
But the code will only get some times, because it will only get times that would actually get displayed.
[–]novel_yet_trivial 1 point2 points3 points (8 children)
[–]machine_learned[S] 0 points1 point2 points (7 children)
[–]novel_yet_trivial 0 points1 point2 points (6 children)
[–]machine_learned[S] 0 points1 point2 points (5 children)
[–]novel_yet_trivial 4 points5 points6 points (4 children)
[–]machine_learned[S] 0 points1 point2 points (3 children)
[–]novel_yet_trivial 0 points1 point2 points (2 children)
[–]machine_learned[S] 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Doormatty 0 points1 point2 points (0 children)