Add calling usleep() to avoid busy waiting