[Application] Replaced usleep() with nanosleep().
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 11 Jun 2015 08:00:53 +0000 (10:00 +0200)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 11 Jun 2015 08:00:53 +0000 (10:00 +0200)
Prevent CID: 444506, 444606

[Verification] TCT pass rate: 100%

Change-Id: Ieca187206d60a7e501a545db754f7163bc669d6c
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/application/application_manager.cc

index ba54862d245ab0c0d2db23c56ada39ef710a86be..ecd1edafb95d8c4666311b7bcc4b605e921de41d 100755 (executable)
@@ -393,7 +393,8 @@ void ApplicationManager::Launch(const picojson::value& args) {
       }
 
       // delay 300ms for each retry
-      usleep(300 * 1000);
+      struct timespec sleep_time = { 0, 300L * 1000L * 1000L };
+      nanosleep(&sleep_time, nullptr);
       ++retry;
 
       LoggerD("Retry launch request: %d", retry);
@@ -589,7 +590,8 @@ void ApplicationManager::LaunchAppControl(const picojson::value& args) {
       }
 
       // delay 300ms for each retry
-      usleep(300 * 1000);
+      struct timespec sleep_time = { 0, 300L * 1000L * 1000L };
+      nanosleep(&sleep_time, nullptr);
       ++retry;
 
       LoggerD("Retry launch request: %d", retry);