FreeBSD equivalents of hwclock and adjtimex?

Dan Nelson dnelson at
Sun Mar 11 07:25:27 UTC 2007

In the last episode (Mar 10), Kelly Jones said:
> What are the FreeBSD equivalents of hwclock (view/set the BIOS
> hardware clock) and adjtimex (adjust clock speed)? I couldn't find
> these two well-known Linux commands in ports?

FreeBSD sets the hardware clock whenever settimeofday() is called
(unless the sysctl machdep.disable_rtc_set is set). I don't think
there's a way to retrieve the current hardware clock settings from

Linux's adjtimex(2) is called ntp_adjtime(2) in FreeBSD.

	Dan Nelson
	dnelson at

More information about the freebsd-questions mailing list