Revision e8a50634 server/src/Arbiter.cpp

View differences:

server/src/Arbiter.cpp
147 147

  
148 148
	// block until ani was played back
149 149
	while (incoming_animation->is_active()) {
150
		// printf("A"); fflush(stdout);
151
		usleep(1 * 1000); // 1ms, save cpu cycles
150
		std::this_thread::sleep_for(std::chrono::milliseconds(1)); // save cpu cycles
152 151
	}
153 152

  
154 153
	// ok, it finished. we can safely remove it now:
......
189 188
	if (audio_player != NULL) {
190 189
		while (audio_player->is_playing()) {
191 190
			// save some cpu cycles:
192
			usleep(1 * 1000); // 1ms
191
			std::this_thread::sleep_for(std::chrono::milliseconds(1)); // 1ms
193 192
		}
194 193
	}
195 194

  
......
197 196
	// so check now if the utterance finished as well:
198 197
	while (utterance->is_playing()) {
199 198
		// save some cpu cycles:
200
		usleep(1 * 1000); // 1ms
199
		std::this_thread::sleep_for(std::chrono::milliseconds(1));
201 200
	}
202 201
}
203 202

  

Also available in: Unified diff