Prevent CID: 439362
[Verification] Code compiles, pass rate should not change.
Change-Id: Ie76d83c2fae67ef82cf739c15ba8c3df93fb5224
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
// 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);