Use while-loop instead of usleep