xref: /freebsd/lib/libc/gen/timespec_getres.3 (revision e0c4386e)
1.\"-
2.\" Copyright (c) 2023 Dag-Erling Smørgrav
3.\"
4.\" SPDX-License-Identifier: BSD-2-Clause
5.\"
6.Dd August 21, 2023
7.Dt TIMESPEC_GETRES 3
8.Os
9.Sh NAME
10.Nm timespec_getres
11.Nd get clock resolution
12.Sh LIBRARY
13.Lb libc
14.Sh SYNOPSIS
15.In time.h
16.Ft int
17.Fn timespec_getres "struct timespec *ts" "int base"
18.Sh DESCRIPTION
19If
20.Fa ts
21is non-null and
22.Fa base
23refers to a supported time base as described in
24.Xr timespec_get 3 ,
25the
26.Nm
27function fills in the structure pointed to by
28.Fa ts
29to reflect the resolution of that time base.
30.Sh RETURN VALUES
31The
32.Nm
33function returns the value of
34.Fa base
35if successful and zero otherwise.
36.Sh SEE ALSO
37.Xr clock_getres 2 ,
38.Xr timespec_get 3
39.\" .Sh STANDARDS
40.\" The
41.\" .Nm
42.\" function conforms to
43.\" .St -isoC-2023 .
44.Sh HISTORY
45This interface first appeared in
46.Fx 14 .
47.Sh AUTHORS
48The
49.Nm
50function and this manual page were written by
51.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org .
52