Doing something synchronized with kernel time (HELP!!!)
    DI BACCO ANTONIO - technolabs 
    Antonio.DiBacco at technolabs.it
       
    Wed May  9 21:08:45 EST 2007
    
    
  
I need to do something every time the number of seconds in the kernel
timer increases.  
I would like to have something like:
 
time_t currSecs, currSecs;
 
while (1)
{    
    read(fd, ....);  /* Sleep for 1 second */
 
    time(&currSecs);  /* I want to be sure that currSecs is 
                         everytime one unit greater than prevSecs */
    prevSecs = 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.
    
    
More information about the Linuxppc-embedded
mailing list