Skip to contentSkip to conversation

adjtime vs. adjtimex

DISCUSSION Manuel Reimer 1 participant 1 message Oct 5, 2013 ABI/API

lore
Share & tools
lore
#0 lore raw

Hello,

I don't know if I'm on the right list. Please point me to a better list if I'm wrong.

What I want to do is to adjust time *once a day* only, but I would prefer to not let the system time jump.

So I have the choice between adjtime and adjtimex.

I would prefer adjtimex, as it enables "11 minute mode" for the hardware clock.

I tried to set an offset with adjtimex and set the clock to status "TIME_OK". My problem is, that this status seems to get lost as soon as my program exits.

If I use "adjtime", then my offset is stored but I can't set the clock to "TIME_OK", so I have to handle hwclock on my own.

Is it possible to use "adjtimex" in a "fire and forget" manner? Is it possible to set an offset and time status to "OK" and keep this status even if my process exits?

Thanks in advance.

Greetings,

Manuel