reduce CPU usage by waiting a few milliseconds