Revision 498cd9cd client/cpp/examples/random_gaze/main.cpp

View differences:

client/cpp/examples/random_gaze/main.cpp
28 28

  
29 29
#include "RobotController.h"
30 30
#include "RobotGaze.h"
31
#include <unistd.h>
31
#include <thread>
32
#include <chrono>
32 33

  
33 34
float rand_float(float min, float max){
34 35
    float f = (float)rand() / RAND_MAX;
......
68 69
		}
69 70

  
70 71
        robot_controller->set_gaze_target(gaze);
71
		usleep(1000/50 * 1000 );
72
    }	
72
        std::this_thread::sleep_for(std::chrono::milliseconds(1000/50));
73
    }
73 74

  
74 75
}

Also available in: Unified diff