Changed nanosleep for usleep