posix_trace_attr_getclockres Subroutine

Purpose

Retrieves the clock resolution.

Library

Posix Trace Library (libposixtrace.a)

Syntax

#include <time.h>
#include <trace.h>

int posix_trace_attr_getclockres(attr, resolution)
const trace_attr_t *attr;
struct timespec *resolution;

Description

The posix_trace_attr_getclockres subroutine copies the clock resolution of the clock that is used to generate timestamps from the attr object into the resolution parameter. The attr object defines the clock resolution. The resolution parameter points to the structure.

If this subroutine is called with a non-initialized attributes object as parameter, the result is not specified.

Parameters

Item Description
attr Specifies the trace attributes object.
resolution Specifies where the clock-resolution attribute of the attr object is stored.

Return Values

Upon successful completion, it returns a value of zero. Otherwise, it returns the corresponding error number.

If successful, the posix_trace_attr_getclockres subroutine stores the clock-resolution attribute value of the resolution parameter. Otherwise, the content of this object is not specified.

Errors

The posix_trace_attr_getclockres subroutine fails if the following error number returns:
Item Description
EINVAL One of the parameters is null.

Files

The trace.h file in AIX® Version 7.1 Files Reference