I’m coding a chess game in python using pygame. One of the common tasks is the need to handle events, and the only way I know how to do it is like this: The while loop just keeps spinning, which is inefficient. In embedded programming, you can send the cpu to sleep until there is an interrupt. Is there a