Doing something synchronized with kernel time (HELP!!!)

From: DI BACCO ANTONIO - technolabs <hidden>
Date: 2007-05-09 11:08:47

I need to do something every time the number of seconds in the kernel
timer increases. =20
I would like to have something like:
=20
time_t currSecs, currSecs;
=20
while (1)
{   =20
    read(fd, ....);  /* Sleep for 1 second */
=20
    time(&currSecs);  /* I want to be sure that currSecs is=20
                         everytime one unit greater than prevSecs */
    prevSecs =3D currSecs;
}

I tried doing a read on /dev/rtc after having enabled one second
interrupt on RTC (RTC_UIE_ON) but RTC is unreliable (too fast).

Bye,
Antonio.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help