POSIX_TRA...TCLOCKRES(3P)
β¨ POSIX_TRA...TCLOCKRES(3P) β POSIX Programmer's Manual β¨
okay bestie, welcome to a page from the POSIX Programmer's Manual, section 3P π. Grab a strawberry π and let's get into it.
πΈ PROLOG πΈ
This manual page is part of the POSIX Programmer's Manual. Heads up though: the Linux implementation of this interface may differ β so go peek at the corresponding Linux manual page for the deets on Linux behavior. Also, lowkey, the interface might just... not be implemented on Linux at all. π
π NAME π
posix_trace_attr_getclockres, posix_trace_attr_getcreatetime, posix_trace_attr_getgenversion, posix_trace_attr_getname, posix_trace_attr_setname β retrieve and set information about a trace stream (TRACING). yes the name is long, it's giving "I have five government names" energy, we move. π
β¨ SYNOPSIS β¨
#include <time.h>
#include <trace.h>
int posix_trace_attr_getclockres(const trace_attr_t *attr,
struct timespec *resolution);
int posix_trace_attr_getcreatetime(const trace_attr_t *attr,
struct timespec *createtime);
#include <trace.h>
int posix_trace_attr_getgenversion(const trace_attr_t *attr,
char *genversion);
int posix_trace_attr_getname(const trace_attr_t *attr,
char *tracename);
int posix_trace_attr_setname(trace_attr_t *attr,
const char *tracename);
π DESCRIPTION π
so here's the whole vibe, function by function π¦
posix_trace_attr_getclockres()β shall copy the clock resolution of the clock used to generate timestamps, taking it from the clock-resolution attribute of the attributes object thatattrpoints to, and dropping it into the structure thatresolutionpoints to. πposix_trace_attr_getcreatetime()β shall copy the trace stream creation time from the creation-time attribute of the attributes object thatattrpoints to, into the structure thatcreatetimepoints to. That creation-time attribute shall represent the time of creation of the trace stream. βposix_trace_attr_getgenversion()β shall copy the string containing version information from the generation-version attribute of the attributes object thatattrpoints to, into the string thatgenversionpoints to. Andgenversionshall be the address of a character array that can store at least{TRACE_NAME_MAX}characters β no smaller, bestie, we need the room. πposix_trace_attr_getname()β shall copy the string containing the trace name from the trace-name attribute of the attributes object thatattrpoints to, into the string thattracenamepoints to. Same deal:tracenameshall be the address of a character array which can store at least{TRACE_NAME_MAX}characters. πposix_trace_attr_setname()β shall set the name in the trace-name attribute of the attributes object thatattrpoints to, using the trace name string supplied bytracename. Now listen π: if the supplied string contains more than{TRACE_NAME_MAX}characters, the name copied into the trace-name attribute may be truncated to one less than the length of{TRACE_NAME_MAX}characters. And the default value? A null string. iconically empty. π«Ά
π RETURN VALUE π
Upon successful completion, these functions shall return a value of zero. Otherwise, they shall return the corresponding error number. no cap.
And when they do succeed, here's where the goods land:
- If successful,
posix_trace_attr_getclockres()stores the clock-resolution attribute value in the object pointed to byresolution. Otherwise, the content of this object is unspecified. π - If successful,
posix_trace_attr_getcreatetime()stores the trace stream creation time in the object pointed to bycreatetime. Otherwise, the content of this object is unspecified. π - If successful,
posix_trace_attr_getgenversion()stores the trace version information in the string pointed to bygenversion. Otherwise, the content of this string is unspecified. π - If successful,
posix_trace_attr_getname()stores the trace name in the string pointed to bytracename. Otherwise, the content of this string is unspecified. π
π ERRORS π
posix_trace_attr_getclockres(), posix_trace_attr_getcreatetime(), posix_trace_attr_getgenversion(), and posix_trace_attr_getname() may fail if:
EINVALβ The value specified by one of the arguments is invalid.
also just a lil note: the following sections are informative. π
π EXAMPLES π
None. (the void, the silence, the emptiness β very demure β¨)
π§ APPLICATION USAGE π§
None. (again! nothing! we love a low-maintenance section π)
π RATIONALE π
None. (she said nothing and she ate π½οΈ)
β FUTURE DIRECTIONS β
bestie, sit down. posix_trace_attr_getclockres(), posix_trace_attr_getcreatetime(), posix_trace_attr_getgenversion(), posix_trace_attr_getname(), and posix_trace_attr_setname() may be removed in a future version. π« so enjoy them while they're here i guess.
π₯ SEE ALSO π₯
posix_trace_attr_destroy()posix_trace_create()posix_trace_get_attr()uname()
The Base Definitions volume of POSIX.1β2017: <time.h>, <trace.h>
π©· 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 β brought to you by IEEE/The Open Group, 2017, page POSIX_TRA...TCLOCKRES(3P). slay, stay traced, mwah πβ¨
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms