Replaced usleep for VS