From: Sung-jae Park Date: Thu, 20 Dec 2012 14:40:02 +0000 (+0900) Subject: Don't try to sync with 00 sec if the period is < 1 X-Git-Tag: submit/tizen_mobile/20150512.125148^2~1^2~15^2~8^2~162 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab435715d02cf0469217db4183abb7680d48de36;p=platform%2Fcore%2Fappfw%2Fdata-provider-slave.git Don't try to sync with 00 sec if the period is < 1 Change-Id: Ib6868a03b774484da27246a13ae9b32afe8dffdd --- diff --git a/packaging/com.samsung.data-provider-slave.spec b/packaging/com.samsung.data-provider-slave.spec index 9384f3f..93a89fd 100644 --- a/packaging/com.samsung.data-provider-slave.spec +++ b/packaging/com.samsung.data-provider-slave.spec @@ -1,6 +1,6 @@ Name: com.samsung.data-provider-slave Summary: Slave data provider -Version: 0.8.13 +Version: 0.8.14 Release: 1 Group: main/app License: Flora License diff --git a/src/lb.c b/src/lb.c index 56bc478..64434b1 100644 --- a/src/lb.c +++ b/src/lb.c @@ -346,6 +346,9 @@ static inline void timer_freeze(struct item *item) struct timeval tv; ecore_timer_freeze(item->timer); + if (ecore_timer_interval_get(item->timer) <= 1.0f) + return; + gettimeofday(&tv, NULL); item->sleep_at = (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0f; } diff --git a/src/util.c b/src/util.c index c0ea002..415f980 100644 --- a/src/util.c +++ b/src/util.c @@ -138,6 +138,11 @@ static inline void compensate_timer(Ecore_Timer *timer) double delay; double pending; + if (ecore_timer_interval_get(timer) <= 1.0f) { + DbgPrint("Doesn't need to sync the timer to start from ZERO sec\n"); + return; + } + if (gettimeofday(&tv, NULL) < 0) { ErrPrint("Error: %s\n", strerror(errno)); return;