HomeFreeBSD

Implement CLOCK_TAI

Description

Implement CLOCK_TAI

Provide a clock through clock_gettime() that returns the current TAI
time (UTC without leap seconds) as a complement to CLOCK_REALTIME. This
provides compatibility with Linux, which also provides a CLOCK_TAI since
kernel 2.6.26, and this seems to be becoming the standard way to acquire
TAI time. Unlike Linux, this code will return EINVAL if the TAI offset
(set by ntpd, ptpd, etc.) is not known since it seems pathological for
CLOCK_TAI to silently give the wrong (UTC) time if the offset is not
known as it does on Linux.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D46268

Details

Provenance
nwhitehornAuthored on Jun 12 2025, 5:52 PM
impCommitted on Jun 12 2025, 6:25 PM
Reviewer
imp
Differential Revision
D46268: Implement CLOCK_TAI
Parents
rG4deb9760a9d8: rc: Disable pathname expansion when calling run_rc_command()
Branches
Unknown
Tags
Unknown