Forums

CPU Usage question

I need to decrease my CPU usage to avoid being in tarpit so fast. My script run an infinite loop. Including a sleep (time.sleep) can potentially decrease the CPU usage or it's the same as a code without it?

Yes, time.sleep is the right choice.