Use g_usleep() instead of deprecated usleep().