From: Pawel Andruszkiewicz
Date: Thu, 11 Jun 2015 09:59:47 +0000 (+0200)
Subject: [Messaging] Replaced usleep() with nanosleep().
X-Git-Tag: submit/tizen/20150702.103311^2~2^2~64^2
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46e4d7002fdc480a9057aa8390c9919b8c3351f9;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
[Messaging] Replaced usleep() with nanosleep().
Prevent CID: 439362
[Verification] Code compiles, pass rate should not change.
Change-Id: Ie76d83c2fae67ef82cf739c15ba8c3df93fb5224
Signed-off-by: Pawel Andruszkiewicz
---
diff --git a/src/messaging/email_manager.cc b/src/messaging/email_manager.cc
index 7a831cab..df32272e 100755
--- a/src/messaging/email_manager.cc
+++ b/src/messaging/email_manager.cc
@@ -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);