Fix tick per sec/min bug 82/125182/1
authorHyunho Kang <hhstark.kang@samsung.com>
Thu, 13 Apr 2017 12:51:13 +0000 (21:51 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Fri, 14 Apr 2017 05:29:18 +0000 (14:29 +0900)
commitcf056a6e5f77c35786a393657931b453a5ccf411
treeb514484f1e2da0809124f0e4458f2f633f002f48
parent51d4c534ea82e97f77f6b1664266cb2e69160149
Fix tick per sec/min bug

When a time tick was set with a long term like 30 seconds,
the tick was not called at the correct time with a very small error,
so the next time tick was set equal to the previous target tick time.
This causes an unintended callback called.
To solve this problem, it store the next time tick before set the timer,
and when the tick callback is called, if the current time's next tick is
same as the stored time, set the timer by calculating the stored
time's next tick.

Change-Id: Ib22470c5810818ab4871abcd3a31ce9278c5008e
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
src/appcore-watch.c