sys_times.h(7POSIX)
π PROLOG π
okay so real talk before we even start: this page is part of the POSIX Programmer's Manual. that means the Linux implementation of this interface may differ (so like, go check the matching Linux manual page for the actual Linux behavior, bestie) β or honestly the interface might not even be implemented on Linux at all. not every vibe ships everywhere π
This one is sys_times.h(7POSIX) from the POSIX Programmer's Manual, and we're about to read the whole thing together, no skimming, no skipping. π«Ά
β¨ NAME β¨
sys/times.h β the file access and modification times structure. that's the whole job. it's giving "one header, one purpose, iconic". π
πΈ SYNOPSIS πΈ
#include <sys/times.h>
that's it. that's the door. walk in. πͺβ¨
π DESCRIPTION π
so the <sys/times.h> header shall define the tms structure. this is the struct that times() hands back to you, and it shall include at least these members:
clock_t tms_utime User CPU time.
clock_t tms_stime System CPU time.
clock_t tms_cutime User CPU time of terminated child processes.
clock_t tms_cstime System CPU time of terminated child processes.
look at her. four little fields, all clock_t, all doing their own thing. tms_utime is your user CPU time, tms_stime is your system CPU time, tms_cutime is the user CPU time of terminated child processes, and tms_cstime is the system CPU time of terminated child processes. children said "here's my CPU time, mom" π
also, the <sys/times.h> header shall define the clock_t type, exactly as described over in <sys/types.h>. don't reinvent her, she already exists. π
and then β the following shall be declared as a function, and it may also be defined as a macro, and a function prototype shall be provided:
clock_t times(struct tms *);
periodt. that's the whole interface. one struct, one function, zero drama. π
heads up: the following sections (APPLICATION USAGE, RATIONALE, FUTURE DIRECTIONS) are informative β not normative. they're the vibes section, not the rules section. π
π APPLICATION USAGE π
None. literally none. nothing to add. she said "no notes" π
π§ RATIONALE π§
None. again, no notes. the reasoning is simply that she's right. β¨
π¦ FUTURE DIRECTIONS π¦
None. the future is bright and it is unchanged. π
π SEE ALSO π
<sys_types.h>β go read that one too, bestie,clock_tlives there π«Ά- The System Interfaces volume of POSIX.1β2017,
times()β the main character herself, the function this whole header is built around π₯
π COPYRIGHT π
okay legal moment, stay with me, this part is important and I'm not changing a single fact of it:
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. (translation: if they disagree, the original wins, no debate, no cap. π«‘)
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 page, bestie!! πβ¨ this one came to you courtesy of IEEE/The Open Group, dated 2017 β so when you cite her, cite her right. mwah. ππ¦π
π¦ 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