Add delay to limit CPU usage.