1timespec(3type)                                                timespec(3type)
2
3
4

NAME

6       timespec - time in seconds and nanoseconds
7

LIBRARY

9       Standard C library (libc)
10

SYNOPSIS

12       #include <time.h>
13
14       struct timespec {
15           time_t     tv_sec;   /* Seconds */
16           /* ... */  tv_nsec;  /* Nanoseconds [0, 999'999'999] */
17       };
18

DESCRIPTION

20       Describes times in seconds and nanoseconds.
21
22       tv_nsec  is of an implementation-defined signed type capable of holding
23       the specified range.  Under glibc, this is usually long, and long  long
24       on X32.  It can be safely down-cast to any concrete 32-bit integer type
25       for processing.
26

VERSIONS

28       Prior to C23, tv_nsec was long.
29

STANDARDS

31       C11, POSIX.1-2008.
32

HISTORY

34       POSIX.1-2001.
35

NOTES

37       The following headers also  provide  this  type:  <aio.h>,  <mqueue.h>,
38       <sched.h>, <signal.h>, <sys/select.h>, and <sys/stat.h>.
39

SEE ALSO

41       clock_gettime(2), clock_nanosleep(2), nanosleep(2), timerfd_gettime(2),
42       timer_gettime(2), time_t(3type), timeval(3type)
43
44
45
46Linux man-pages 6.05              2023-03-30                   timespec(3type)
Impressum