I'm writing a software in C and it is running as a systemd
service. I need the service to run after time has synced or alternatively, I need a way for my C program to identify if time has synced.
I'm not using GPS or RTC. Just the plain Raspberry (both Zero W and 3B+).
I'm using Raspbian Strecth. I was trying to use time-sync.target
but it still call my service before date/time is synced.
How can I detect if system has updated its time?
/var/lib/systemd/clock
, I don't know what to compare it with, to determine if system has synced or not. – Diogo Melo Nov 19 '19 at 23:54