# posix_trace_attr_getclockres

## PROLOG



           This manual page is part of the POSIX Programmer's Manual.  The
           Linux implementation of this interface may differ (consult the
           corresponding Linux manual page for details of Linux behavior), or
           the interface may not be implemented on Linux.
    


## 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**)
    


## 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



           The _posix_trace_attr_getclockres_() function shall copy the clock
           resolution of the clock used to generate timestamps from the
           _clock-resolution_ attribute of the attributes object pointed to by
           the _attr_ argument into the structure pointed to by the _resolution_
           argument.
    
           The _posix_trace_attr_getcreatetime_() function shall copy the trace
           stream creation time from the _creation-time_ attribute of the
           attributes object pointed to by the _attr_ argument into the
           structure pointed to by the _createtime_ argument. The _creation-time_
           attribute shall represent the time of creation of the trace
           stream.
    
           The _posix_trace_attr_getgenversion_() function shall copy the
           string containing version information from the _generation-version_
           attribute of the attributes object pointed to by the _attr_ argument
           into the string pointed to by the _genversion_ argument. The
           _genversion_ argument shall be the address of a character array
           which can store at least {TRACE_NAME_MAX} characters.
    
           The _posix_trace_attr_getname_() function shall copy the string
           containing the trace name from the _trace-name_ attribute of the
           attributes object pointed to by the _attr_ argument into the string
           pointed to by the _tracename_ argument. The _tracename_ argument shall
           be the address of a character array which can store at least
           {TRACE_NAME_MAX} characters.
    
           The _posix_trace_attr_setname_() function shall set the name in the
           _trace-name_ attribute of the attributes object pointed to by the
           _attr_ argument, using the trace name string supplied by the
           _tracename_ argument. 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. The default value is a null string.
    


## RETURN VALUE



           Upon successful completion, these functions shall return a value
           of zero. Otherwise, they shall return the corresponding error
           number.
    
           If successful, the _posix_trace_attr_getclockres_() function stores
           the _clock-resolution_ attribute value in the object pointed to by
           _resolution_.  Otherwise, the content of this object is unspecified.
    
           If successful, the _posix_trace_attr_getcreatetime_() function
           stores the trace stream creation time in the object pointed to by
           _createtime_.  Otherwise, the content of this object is unspecified.
    
           If successful, the _posix_trace_attr_getgenversion_() function
           stores the trace version information in the string pointed to by
           _genversion_.  Otherwise, the content of this string is unspecified.
    
           If successful, the _posix_trace_attr_getname_() function stores the
           trace name in the string pointed to by _tracename_.  Otherwise, the
           content of this string is unspecified.
    


## ERRORS



           The _posix_trace_attr_getclockres_(),
           _posix_trace_attr_getcreatetime_(),
           _posix_trace_attr_getgenversion_(), and _posix_trace_attr_getname_()
           functions may fail if:
    
           **EINVAL** The value specified by one of the arguments is invalid.
    
           _The following sections are informative._
    


## EXAMPLES



           None.
    


## APPLICATION USAGE



           None.
    


## RATIONALE



           None.
    


## FUTURE DIRECTIONS



           The _posix_trace_attr_getclockres_(),
           _posix_trace_attr_getcreatetime_(),
           _posix_trace_attr_getgenversion_(), _posix_trace_attr_getname_(), and
           _posix_trace_attr_setname_() functions may be removed in a future
           version.
    


* * *