Fix issue the current time is initialized whenever the device is restarted 19/233019/2
authorInHong Han <inhong1.han@samsung.com>
Mon, 11 May 2020 07:39:43 +0000 (16:39 +0900)
committerInHong Han <inhong1.han@samsung.com>
Mon, 11 May 2020 09:17:53 +0000 (18:17 +0900)
Change-Id: Ie1310dc403ed46ee5705cc7cf88f1c3c6cd12434

receiver/src/ft.cpp
receiver/src/main.cpp

index 9982af9..336e965 100644 (file)
@@ -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);
     }
index 6a7cb61..34b9837 100644 (file)
@@ -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;