Index: lib/libc/sys/clock_gettime.2 =================================================================== --- lib/libc/sys/clock_gettime.2 +++ lib/libc/sys/clock_gettime.2 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2021 +.Dd July 1, 2021 .Dt CLOCK_GETTIME 2 .Os .Sh NAME @@ -68,10 +68,12 @@ .It Dv CLOCK_REALTIME .It Dv CLOCK_REALTIME_PRECISE .It Dv CLOCK_REALTIME_FAST +.It Dv CLOCK_REALTIME_COARSE Increments as a wall clock should. .It Dv CLOCK_MONOTONIC .It Dv CLOCK_MONOTONIC_PRECISE .It Dv CLOCK_MONOTONIC_FAST +.It Dv CLOCK_MONOTONIC_COARSE Increments in SI seconds. .It Dv CLOCK_UPTIME .It Dv CLOCK_UPTIME_PRECISE @@ -104,6 +106,11 @@ .Fa CLOCK_UPTIME_PRECISE are used to get the most exact value as possible, at the expense of execution time. +Finally, the clock IDs +.Fa CLOCK_REALTIME_COARSE , +.Fa CLOCK_MONOTONIC_COARSE +are aliases of corresponding IDs wit _FAST suffix for compatibility with other +systems. .Pp The structure pointed to by .Fa tp Index: sys/sys/time.h =================================================================== --- sys/sys/time.h +++ sys/sys/time.h @@ -486,8 +486,10 @@ #define CLOCK_UPTIME_FAST 8 /* FreeBSD-specific. */ #define CLOCK_REALTIME_PRECISE 9 /* FreeBSD-specific. */ #define CLOCK_REALTIME_FAST 10 /* FreeBSD-specific. */ +#define CLOCK_REALTIME_COARSE CLOCK_REALTIME_FAST /* Linux compat */ #define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */ #define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */ +#define CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST /* Linux compat */ #define CLOCK_SECOND 13 /* FreeBSD-specific. */ #define CLOCK_THREAD_CPUTIME_ID 14 #define CLOCK_PROCESS_CPUTIME_ID 15