Replace sleep (1s) by usleep (100ms)