No, I don't want to do this from application level hence why I am looking
for an alternative. NuttX also has function clock_resynchronize() that
should solve the problem with time going backwards but not sure if it has
ever been tested and used.

There is an RTC timer driver in drivers/timers that you can use to read to the RTC and receive alarms.  That with adjtime() would support a application level solution.

A problem with clock_synchronization() is that it depends on the properties of the RTC so you probably could not make a general solution with it.  For example, different RTCs have different time representations, different resolutions, and different behaviors. Many have resolution only to 1 second.  Some have sub-second resolution.  Different RTCs support different interrupts when events occur like the 1 second increment.  Some RTCs support alarms.


Reply via email to