Debian Codegraph @

upstream/debian-unstable/man3/TIMEVAL_TO_TIMESPEC.3

raw
1 .\" Copyright, the authors of the Linux man-pages project
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .TH TIMEVAL_TO_TIMESPEC 3 2025-05-17 "Linux man-pages 6.18"
6 .SH NAME
7 TIMEVAL_TO_TIMESPEC,
8 TIMESPEC_TO_TIMEVAL
9 \-
10 convert between time structures
11 .SH SYNOPSIS
12 .nf
13 .B #define _GNU_SOURCE
14 .B #include <sys/time.h>
15 .P
16 .BI "void TIMEVAL_TO_TIMESPEC(const struct timeval *" tv ", struct timespec *" ts );
17 .BI "void TIMESPEC_TO_TIMEVAL(struct timeval *" tv ", const struct timespec *" ts );
18 .fi
19 .SH DESCRIPTION
20 These macros convert from a
21 .BR timeval (3type)
22 to a
23 .BR timespec (3type)
24 structure,
25 and vice versa,
26 respectively.
27 .P
28 This is especially useful for writing interfaces that receive a type,
29 but are implemented with calls to functions that receive the other one.
30 .SH STANDARDS
31 GNU,
32 BSD.