Use usleep instead of sleep, some MinGW versions lack sleep.