Replace calls to deprecated fxsleep() function with FXThread::sleep()