Monitor for the clock changes from the kernel
Review Request #125028 - Created Sept. 2, 2015 and submitted
At the moment we update the clock when we resume from suspend or from
the time KCM.
However the signal from the clock KCM isn't very good as it signals just
after it requests an NTP update or clock change, not necessarily when
Also we miss any external NTP updates which might occur at other times
throughout the day, such as a big change when we connect to the network
This method also avoids needing solid to tell us when we're resuming
from suspend, which is deprecated API and also seems slightly slower.
Looks good to me
We should probably add
TFD_CLOEXECbut glibc headers don't seem to have it: Linux source has
#define TFD_CLOEXEC O_CLOEXECso we can use
Maybe add a comment that glibc doesn't provide the
TFD_TIMER_CANCEL_ON_SETconstant and that's why you are using 3 instead of the constants.
Also shouldn't there be an error check here?
It is unlikely that someone runs with Linux < 3.0 and we therefore get a
EINVAL, but it can still return
EBADFif the call to