From: InHong Han Date: Mon, 11 May 2020 07:39:43 +0000 (+0900) Subject: Fix issue the current time is initialized whenever the device is restarted X-Git-Tag: submit/tizen_5.5/20200511.094133~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F19%2F233019%2F2;p=platform%2Fcore%2Fuifw%2Fcapi-ui-sticker.git Fix issue the current time is initialized whenever the device is restarted Change-Id: Ie1310dc403ed46ee5705cc7cf88f1c3c6cd12434 --- diff --git a/receiver/src/ft.cpp b/receiver/src/ft.cpp index 9982af9..336e965 100644 --- a/receiver/src/ft.cpp +++ b/receiver/src/ft.cpp @@ -94,7 +94,7 @@ static int sync_complete_flags = 0; static void save_last_sync_time() { // save last sync time in preference - double current_time = ecore_time_get(); + double current_time = ecore_time_unix_get(); if (preference_set_double(LAST_SYNC_TIME, current_time) == PREFERENCE_ERROR_NONE) { LOGI("Succeed to set last sync time : %f", current_time); } diff --git a/receiver/src/main.cpp b/receiver/src/main.cpp index 6a7cb61..34b9837 100644 --- a/receiver/src/main.cpp +++ b/receiver/src/main.cpp @@ -98,14 +98,14 @@ static bool check_sync_time_condition() } // compare time - LOGD("current time : %f, last_sync_time : %f", ecore_time_get(), last_sync_time); + LOGD("current time : %f, last_sync_time : %f", ecore_time_unix_get(), last_sync_time); - if (ecore_time_get() - last_sync_time > MAX_WAIT_TIME) { + if (ecore_time_unix_get() - last_sync_time > MAX_WAIT_TIME) { initialize_sap(); request_show_sync_notification(); result = false; } else { - if (ecore_time_get() - last_sync_time > SYNC_INTERVAL) + if (ecore_time_unix_get() - last_sync_time > SYNC_INTERVAL) result = true; else result = false;