So I'm making a simple clicker game which uses an automine function. This function is supposed to run every 3 seconds but if i use the time.sleep method it just stops the entire GUI. Is there a way to delay a specific function without stopping everything else?
Asked
Active
Viewed 23 times
0
-
Threading or Multiprocessing seems like a possible solution, what have you tried and what were your results? Please [edit] to include a [mcve] – G. Anderson Mar 16 '21 at 15:02
-
If you're using pygame, have you looked into [`set_timer()`](https://www.pygame.org/docs/ref/time.html#pygame.time.set_timer)? – Fred Larson Mar 16 '21 at 15:12
-
I found a way, thanks for the help! – Adrian Otgonzaya Mar 16 '21 at 15:15