struct timex and Linux adjtimex()

Poul-Henning Kamp phk at phk.freebsd.dk
Thu Dec 3 22:13:38 UTC 2020


--------
Cy Schubert writes:

> I will go back 
> with my initial proposal of a timespec add/subtract syscall takes a 
> timespec as input increments or decrements the clock by the timespec and 
> returns a timespec with the time.

I would be tempted by the clock_settime(2) "clock_id" argument.

The functionality required has a LOT more commonality with
clock_settime(2) than with ntp_adjtime(2), and absconding with a
couple of the top bits of clock_id for "CLOCK_ADD_ADJUSTMENT" and
"CLOCK_SUB_ADJUSTMENT" would be be a pretty clean solution.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-arch mailing list