Discussion:
How to get notification when time changes
(too old to reply)
prashantkumar dhotre
2018-01-23 11:10:13 UTC
Permalink
Raw Message
Hi
When time changes in system , I see
"systemd[1]: Time has been changed" journal log. From systemd,
Is there a way for my app to get notification about this time change event ?
From code it does not look like we have a way.
Thanks
Lennart Poettering
2018-01-23 13:36:32 UTC
Permalink
Raw Message
Post by prashantkumar dhotre
Hi
When time changes in system , I see
"systemd[1]: Time has been changed" journal log. From systemd,
Is there a way for my app to get notification about this time change event ?
Use the timerfd interface for that. See timerfd_create(2) for that,
you are looking for the TFD_TIMER_CANCEL_ON_SET flag.

Lennart
--
Lennart Poettering, Red Hat
Loading...