Synchronising system clock to UTC while using a timer
I am using a linux timer:
and setting up the timer to fire first at the half second of the current second and then every second afterwards:
AbsTimer.it_value.tv_sec = TimeNow.tv_sec;
AbsTimer.it_value.tv_nsec = 500 000 000;
AbsTimer.it_interval.tv_sec = 1;
Now if I choose to update the system clock, using another function to synchronise it to UTC what happens to this current timer, will it next fire at the half second again and then every second after, or will the timer need to be closed, and re-initialised?
Here is what I see happening
timer fires at .5sec, 1.5 sec, 2.5sec, 3.5sec etc...
Function to synchronise comes along at some point before the timer fires ie between .5 and 1.5, and changes the clock to 5.00sec. (for example) Will the timer then fire half a sec later? or a full second later?