Dear Jurt, On 26 Mar 2002 at 17:17, Kurt Roeckx wrote: > On Tue, Mar 26, 2002 at 01:01:00PM +0100, TAJTHY Tamás wrote: > > I'd like to set up the system to update the RTC based on the system clock > > (set by an external source) automatically. I found that with the do_adjtimex > > function this can be done. I have to clear the STA_UNSYNC bit in the .status > > filed of the timex structure. It seems that the .maxerror field also has to > > be set to 0 also, because if I don't set it to 0 the STA_UNSYNC bit will be > > set by the system automatically. > > > > Can anyone help me how this should be implemented? > > Have you considered doing it from userspace instead? hwclock > should do. THX for Your answer! I synchronize the system clock to an external source so I use do_adjtimex to do this gently (not skipping or repeating seconds). It seems for me that this function is capable to sync the system time with RTC periodically. If I read the code carefully enough this function used for NTP protocol implementation which is almost what I'm trying to do. The hwclock also a good issue, but it is not able to modify the system clock gently. THX && Good byte! -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/