-1

sorry this is a little hard to explain, say i wanted a program to constantly being doing one task (task A) but every 5 seconds it does a new task (task B) without interupting the flow of task A? ive looked around a bit but cant seem to find a clear awnser on how to do this, thanks for your help and apologies for being vague im very new to python :)!

ive tried working with asyncio but im not sure i understand it intuitivly enough and i dont know if its what i need in my situation

in my example im using pygame but this process does not nessicarily apply to pygame:

  pygame.display.toggle_fullscreen
  clock.tick(60)
  time.sleep(5.5) # <- I want other code to be running during this break.
  running = False
pygame.quit()

0 Answers0