Use ecore timer instead of usleep 71/127371/1
authorWonnam Jang <wn.jang@samsung.com>
Thu, 27 Apr 2017 06:00:22 +0000 (15:00 +0900)
committerWonnam Jang <wn.jang@samsung.com>
Thu, 27 Apr 2017 06:00:22 +0000 (15:00 +0900)
Change-Id: Ife009c6ebe7a5a3defc8f5837302eb9ca3a27ef6
Signed-off-by: Wonnam Jang <wn.jang@samsung.com>
server/ttsd_server.c

index 8820904..56cbf40 100644 (file)
@@ -74,7 +74,6 @@ static Eina_Bool __wait_synthesis(void *data)
 
        if (uid > 0) {
                if (TTSD_SYNTHESIS_CONTROL_DOING == __server_get_synth_control()) {
-                       usleep(100000);
                        return EINA_TRUE;
                } else {
                        g_wait_timer = NULL;
@@ -150,7 +149,7 @@ static int __synthesis(int uid, const char* credential)
                        int pid = ttsd_data_get_pid(uid);
                        ttsdc_send_set_state_message(pid, uid, APP_STATE_READY);
                } else {
-                       g_wait_timer = ecore_timer_add(0, __wait_synthesis, (void*)credential);
+                       g_wait_timer = ecore_timer_add(0.05, __wait_synthesis, (void*)credential);
                }
 
                if (NULL != speak_data) {