Retrieves the creation time of a trace stream.
Posix Trace Library (libposixtrace.a)
#include <time.h>
#include <trace.h>
int posix_trace_attr_getcreatetime(attr, createtime)
const trace_attr_t *attr;
struct timespec *createtime;
The posix_trace_attr_getcreatetime subroutine copies the amount of time to create a trace stream from the creation-time attribute of the attr object into the createtime parameter. The value of the createtime parameter is a structure.
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* and nanoseconds */
};
If the posix_trace_attr_getcreatetime subroutine is called with a non-initialized attributes object as parameter, the result is not specified.
Item | Description |
---|---|
attr | Specifies the trace attributes object. |
createtime | Specifies where the creation-time attribute is stored. |
Upon successful completion, it returns a value of zero. Otherwise, it returns the corresponding error number.
If successful, the posix_trace_attr_getcreatetime subroutine stores the trace stream creation time in the createtime parameter. Otherwise, the content of this object is not specified.
Item | Description |
---|---|
EINVAL | One of the parameters is null. Or the trace attributes object is not retrieved with the posix_trace_get_attr subroutine on a stream. |
The trace.h file in AIX® Version 7.1 Files Reference