CVSROOT:        /cvs
Module name:    src
Changes by:     chel...@cvs.openbsd.org 2018/03/02 09:35:58

Modified files:
        lib/libc/gen   : times.c times.3 

Log message:
Return monotonically increasing values.

The latest POSIX description of times(3) (and all others I can find)
suggests that times(3) should return monotonically increasing values
and that these values are only useful for real time interval measurement.
All extant uses of times(3) confirm that this expectation is shared by
application programmers.

So, change gettimeofday(2) to clock_gettime(2)/CLOCK_MONOTONIC to ensure
the return value increases monotonically, even if the system clock is
changed by the superuser.  Then update the manpage accordingly.

While we're updating the manpage, move the information about the return
values to a new RETURN VALUES section to bring times.3 up to speed with
other library man pages.

Manpage changes kicked around on tech@ with millert@ and jmc@.

times.3 ok millert@ tb@ jmc@
times.c ok millert@ tb@

Reply via email to