[Messaging] Replaced usleep() with nanosleep().
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 11 Jun 2015 09:59:47 +0000 (11:59 +0200)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Thu, 11 Jun 2015 09:59:47 +0000 (11:59 +0200)
Prevent CID: 439362

[Verification] Code compiles, pass rate should not change.

Change-Id: Ie76d83c2fae67ef82cf739c15ba8c3df93fb5224
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/messaging/email_manager.cc

index 7a831cabb732e43e4aadb310a3968e55e46e2669..df32272e5d89b702898e7f6419b80eec39da0cbb 100755 (executable)
@@ -1439,7 +1439,8 @@ PlatformResult EmailManager::RemoveConversationsPlatform(ConversationCallbackDat
     // so use polling to wait the thread is removed.
     email_mail_data_t *thread_info = NULL;
     do {
-      usleep(300 * 1000);
+      struct timespec sleep_time = { 0, 300L * 1000L * 1000L };
+      nanosleep(&sleep_time, nullptr);
       LoggerD("Waiting to delete this email thread...");
       error = email_get_thread_information_by_thread_id(
           thread_id, &thread_info);