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

View differences:

client/cpp/examples/speech_test/main.cpp
27 27
*/
28 28

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

  
32 33
#define BLOCKING true
33 34

  
......
38 39

  
39 40
    printf("> speech test starting.\n");
40 41

  
41
    robot_controller->set_speak("i will start counting now.\n", BLOCKING);
42
    robot_controller->set_speak("I will start counting now.\n", BLOCKING);
42 43
    while(1){
43 44
        std::string text = std::to_string(count++);
44 45
        printf("> saying '%s'\n",text.c_str());
45 46
        robot_controller->set_speak(text, BLOCKING);
46
        sleep(1);
47
        std::this_thread::sleep_for(std::chrono::seconds(1));
47 48
    }
48

  
49 49
}

Also available in: Unified diff