fascinating. thank you very much for your efforts into something that the linux community clearly needed resolved.
how did you decide to make it 10 seconds offset? does that include a substantial padding against unstably reset clocks?
/* Calculate the next leap second */
tv.tv_sec += 86400 - tv.tv_sec % 86400;
/* Set the time to be 10 seconds from that time */
tv.tv_sec -= 10;