diff --git a/src/comm/MAVLinkSimulationLink.cc b/src/comm/MAVLinkSimulationLink.cc index ec2d7ace0ac34ea81c663225ad7235cf340b726e..d6e338cb0c3a3ccc275059832a0cd1e2009b3142 100644 --- a/src/comm/MAVLinkSimulationLink.cc +++ b/src/comm/MAVLinkSimulationLink.cc @@ -116,7 +116,7 @@ void MAVLinkSimulationLink::run() } last = MG::TIME::getGroundTimeNow(); } - msleep((rate / 20)); + MG::SLEEP::msleep(2); } } diff --git a/src/input/JoystickInput.cc b/src/input/JoystickInput.cc index 4de27617b5bc3e69d104623143df939f5f2e655d..8fb7618589efd8b9fb2f598dc7f56063917ad216 100644 --- a/src/input/JoystickInput.cc +++ b/src/input/JoystickInput.cc @@ -104,7 +104,7 @@ void JoystickInput::init() // Wait for joysticks if none is connected while (numJoysticks == 0) { - msleep(200); + MG::SLEEP::msleep(200); // INITIALIZE SDL Joystick support if (SDL_InitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_NOPARACHUTE) < 0) { @@ -276,7 +276,7 @@ void JoystickInput::run() } // Sleep, update rate of joystick is approx. 50 Hz (1000 ms / 50 = 20 ms) - msleep(20); + MG::SLEEP::msleep(20); }