Add usleep to reduce the CPU usage.