sys_times.h(0P)

๐Ÿ’– sys_times.h โ€” bestie edition ๐Ÿ’–

okay so this is a page from the POSIX Programmer's Manual, and you're looking at sys_times.h(0P). The Linux version of this interface might do its own lil thing (so peek at the matching Linux man page for the deets), or it might not even be implemented on Linux at all. just a heads up, no cap. ๐Ÿซถ


โœจ NAME โœจ

sys/times.h โ€” the header that holds the file access and modification times structure. it's giving clock energy fr. ๐Ÿ•ฐ๏ธ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <sys/times.h>

๐Ÿ’… DESCRIPTION ๐Ÿ’…

so the <sys/times.h> header is gonna define the tms structure, which is the whole point of times() returning it, 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.

let's break it down bestie, because these names lowkey look like alphabet soup:

  • tms_utime โ€” the user CPU time. that's you, main character, doing your thing. ๐Ÿ‘‘
  • tms_stime โ€” the system CPU time. the kernel doing its lil tasks for you. โœจ
  • tms_cutime โ€” user CPU time of terminated child processes. the kids already went home but their time still counts. ๐Ÿ˜ญ
  • tms_cstime โ€” system CPU time of terminated child processes. same vibe, system flavored. ๐Ÿ’€

also, the <sys/times.h> header shall define the clock_t type exactly as it's described over in <sys/types.h>. slay, type definitions staying consistent.

the following shall be declared as a function and may also be defined as a macro. a function prototype shall be provided:

clock_t times(struct tms *);
๐ŸŽ€ note bestie: "may also be defined as a macro" is doing a lot of heavy lifting here โ€” so don't assume it's always a plain function call, iykyk.

and then, the following sections are informative. (meaning: they're here for the vibes and context, not the hard requirements. periodt.)


๐ŸŒˆ APPLICATION USAGE ๐ŸŒˆ

None. literally nothing. the void. ๐Ÿ˜ญ๐Ÿ•ณ๏ธ


๐Ÿงš RATIONALE ๐Ÿงš

None. also nothing. iconic of them honestly. ๐Ÿ’…


๐Ÿฆ‹ FUTURE DIRECTIONS ๐Ÿฆ‹

None. crystal ball says: no changes coming. ๐Ÿ”ฎ


โญ SEE ALSO โญ

  • <sys_types.h>
  • The System Interfaces volume of POSIX.1โ€2017, times()

okay so the legal girlies need their moment, and honestly they earned 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. 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 a wrap bestie!! ๐Ÿ’–โœจ this page is brought to you by IEEE/The Open Group, 2017, and the manual page is sys_times.h(0P). go off and time some processes, you got this ๐Ÿซถ๐ŸŽ€

๐Ÿ“ฆ where this page comes from