sys_time.h(7POSIX)
π PROLOG π
okay bestie, quick heads up before we dive in: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (so like, go check the corresponding Linux manual page for the deets on how Linux actually does it), or the interface might not even be implemented on Linux at all. π
β¨ NAME β¨
sys/time.h β time types. that's it, that's the vibe. we're talking about the time types header, and it's iconic for it. ππ
πΈ SYNOPSIS πΈ
#include <sys/time.h>
π DESCRIPTION π
so the <sys/time.h> header shall define the timeval structure, and it shall include at least these members:
time_t tv_sec Seconds.
suseconds_t tv_usec Microseconds.
the <sys/time.h> header shall also define the itimerval structure, which shall include at least these members:
struct timeval it_interval Timer interval.
struct timeval it_value Current value.
the <sys/time.h> header shall define the time_t and suseconds_t types as described in <sys/types.h>. periodt. π
the <sys/time.h> header shall define the fd_set type as described in <sys/select.h>. slay.
and now, the main characters β the <sys/time.h> header shall define these symbolic constants for the which argument of getitimer() and setitimer():
ITIMER_REALβ decrements in real time. clocking actual time, fr fr.ITIMER_VIRTUALβ decrements in process virtual time.ITIMER_PROFβ decrements both in process virtual time and when the system is running on behalf of the process. overachiever energy, honestly. π₯
the <sys/time.h> header shall define the following as described in <sys/select.h>: FD_CLR() FD_ISSET() FD_SET() FD_ZERO() FD_SETSIZE
the following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided. no cap, these are them:
int getitimer(int, struct itimerval *);
int gettimeofday(struct timeval *restrict, void *restrict);
int setitimer(int, const struct itimerval *restrict,
struct itimerval *restrict);
int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
struct timeval *restrict);
int utimes(const char *, const struct timeval [2]);
π heads up: inclusion of the<sys/time.h>header may make visible all symbols from the<sys/select.h>header. surprise crossover episode, bestie.
the following sections are informative. (yes, they're like, the bonus content. not the main plot but still cute.)
π APPLICATION USAGE π
None. literally nothing. empty. a whole mood. π¦
π RATIONALE π
None. again, nothing. we're keeping it mysterious. β¨
β FUTURE DIRECTIONS β
None. no future plans, living in the present, main character energy. π
π«Ά SEE ALSO π«Ά
<sys_select.h><sys_types.h>
The System Interfaces volume of POSIX.1β2017, futimens(), getitimer(), gettimeofday(), pselect()
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie!! this one came from the IEEE/The Open Group, dated 2017, and it lives at sys_time.h(7POSIX) in the POSIX Programmer's Manual. go off, time types. πβ¨π
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms