Using the monotonic clock in time(1)?

Alan Somers asomers at freebsd.org
Wed Feb 21 21:33:06 UTC 2018


time(1) currently uses the realtime clock, which is undesirable for timing
short-lived commands while ntpd is active.  I opened a review to add an
option to use the monotonic clock instead, but jilles suggested that time
should use the monotonic clock unconditionally, since that's almost always
better for measuring short durations.  However, the Open Group's
specification seems to require the real time clock.  What do the standards
folks think?  Is the Open Group spec sufficiently ambiguous and/or wrong
that we should switch to the monotonic clock instead?

https://reviews.freebsd.org/D14032
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/time.html

-alan


More information about the freebsd-standards mailing list