On 2019-11-05, R.Wieser wrote:
> Mike,
>
>> How about using ntp plus a cheap usb gps dongle to keep the time?
>
>:-) I already have a good (precise) RTC here which I could just tell
> raspbian to use. But thats not the problem I currently want to solve.
> Seeing if /any/ of the clock-setting/synchronisation methods has been
> applied is.
Ok I've not been following closely, it's been too tortuous and tangential,
but surely all you need to do is read the RTC and the linux system time
and compare them. I see you think you have a "precise" realtime clock -
do you know how well it keeps time?
Some years back, I had an early ARM board with Linux and and an RTC.
On boot the system read the RTC to set the kernel clock, and on shutdown
it set the RTC to the current kernel system time. The kernel system time
wasn't too accurate - it drifted. Mind you the RTC wasn't super brilliant
either. I rembember using adjtimex (you may have to install it) to adjust
the parameters of the kernel system clock to make it as accurate as I
needed, given my environment (temp etc). The details escape me now, the
grey cells aren't what they were. but I compared the board time to another
computer running NTP to get them as close as possible. Took some time.
Of course if you insist on wanting to do all this in a single python
program I can't help, sorry, I haven't learnt python. I could have done it
all in C, which I can progrma in, but why bother when there are utilities
already made for doing things.
> The target is to prohibit a program (python script in this case) from doing
> filetime comparisions when the clock cannot be depended upon. Like in your
> case before the dongle has been able to synchronise to the gps sattelites.
>
Jim
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|