Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136493057
D30988.id91714.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D30988.id91714.diff
View Options
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,14 +68,17 @@
.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
.It Dv CLOCK_UPTIME_FAST
+.It Dv CLOCK_BOOTTIME
Starts at zero when the kernel boots and increments
monotonically in SI seconds while the machine is running.
.It Dv CLOCK_VIRTUAL
@@ -104,6 +107,16 @@
.Fa CLOCK_UPTIME_PRECISE
are used to get the most exact value as possible, at the expense of
execution time.
+The clock IDs
+.Fa CLOCK_REALTIME_COARSE ,
+.Fa CLOCK_MONOTONIC_COARSE
+are aliases of corresponding IDs with _FAST suffix for compatibility with other
+systems.
+Finally,
+.Dv CLOCK_BOOTTIME
+is an alias for
+.Dv CLOCK_UPTIME
+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
@@ -491,6 +491,10 @@
#define CLOCK_SECOND 13 /* FreeBSD-specific. */
#define CLOCK_THREAD_CPUTIME_ID 14
#define CLOCK_PROCESS_CPUTIME_ID 15
+
+#define CLOCK_BOOTTIME CLOCK_UPTIME /* Linux compat */
+#define CLOCK_REALTIME_COARSE CLOCK_REALTIME_FAST /* Linux compat */
+#define CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST /* Linux compat */
#endif
#ifndef TIMER_ABSTIME
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 19, 1:10 AM (11 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25573477
Default Alt Text
D30988.id91714.diff (1 KB)
Attached To
Mode
D30988: clock_gettime: Add Linux aliases for CLOCK_*
Attached
Detach File
Event Timeline
Log In to Comment