On Sun, Sep 16, 2012 at 02:11:48PM +0800, Queen Adam wrote:
> I'm using Archlinux ARM for my Melo A100 box.
> The hwclock always timeout when using select() in rtc.c.
>
> After I change the timeout from 5 to 10, the problem is solved.
>
> In fact the timeout in my ARM box seems only to be a little larger
> than 5s.
Signed-off-by: Karel Zak <kzak@redhat.com>
struct timeval tv;
/*
- * Wait up to five seconds for the next update
+ * Wait up to ten seconds for the next update
* interrupt
*/
FD_ZERO(&rfds);
FD_SET(rtc_fd, &rfds);
- tv.tv_sec = 5;
+ tv.tv_sec = 10;
tv.tv_usec = 0;
rc = select(rtc_fd + 1, &rfds, NULL, NULL, &tv);
ret = 1;