aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/gen/timespec_getres.3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/timespec_getres.3')
-rw-r--r--lib/libc/gen/timespec_getres.351
1 files changed, 51 insertions, 0 deletions
diff --git a/lib/libc/gen/timespec_getres.3 b/lib/libc/gen/timespec_getres.3
new file mode 100644
index 000000000000..e00af6758f1a
--- /dev/null
+++ b/lib/libc/gen/timespec_getres.3
@@ -0,0 +1,51 @@
+.\"-
+.\" Copyright (c) 2023 Dag-Erling Smørgrav
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.Dd August 21, 2023
+.Dt TIMESPEC_GETRES 3
+.Os
+.Sh NAME
+.Nm timespec_getres
+.Nd get clock resolution
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In time.h
+.Ft int
+.Fn timespec_getres "struct timespec *ts" "int base"
+.Sh DESCRIPTION
+If
+.Fa ts
+is non-null and
+.Fa base
+refers to a supported time base as described in
+.Xr timespec_get 3 ,
+the
+.Nm
+function fills in the structure pointed to by
+.Fa ts
+to reflect the resolution of that time base.
+.Sh RETURN VALUES
+The
+.Nm
+function returns the value of
+.Fa base
+if successful and zero otherwise.
+.Sh SEE ALSO
+.Xr clock_getres 2 ,
+.Xr timespec_get 3
+.\" .Sh STANDARDS
+.\" The
+.\" .Nm
+.\" function conforms to
+.\" .St -isoC-2023 .
+.Sh HISTORY
+This interface first appeared in
+.Fx 14 .
+.Sh AUTHORS
+The
+.Nm
+function and this manual page were written by
+.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org .