Revision 498cd9cd server/src/Arbiter.cpp
server/src/Arbiter.cpp | ||
---|---|---|
144 | 144 |
|
145 | 145 |
//block until ani was played back |
146 | 146 |
while(incoming_animation->is_active()){ |
147 |
//printf("A"); fflush(stdout); |
|
148 |
usleep(1*1000); //1ms, save cpu cycles |
|
147 |
std::this_thread::sleep_for(std::chrono::milliseconds(1));//save cpu cycles |
|
149 | 148 |
} |
150 | 149 |
|
151 | 150 |
//ok, it finished. we can safely remove it now: |
... | ... | |
183 | 182 |
if (audio_player != NULL){ |
184 | 183 |
while(audio_player->is_playing()){ |
185 | 184 |
//save some cpu cycles: |
186 |
usleep(1*1000); //1ms
|
|
185 |
std::this_thread::sleep_for(std::chrono::milliseconds(1)); //1ms
|
|
187 | 186 |
} |
188 | 187 |
} |
189 | 188 |
|
... | ... | |
191 | 190 |
//so check now if the utterance finished as well: |
192 | 191 |
while (utterance->is_playing()){ |
193 | 192 |
//save some cpu cycles: |
194 |
usleep(1*1000); //1ms
|
|
193 |
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
|
195 | 194 |
} |
196 | 195 |
|
197 | 196 |
} |
Also available in: Unified diff