Back to Darwin Xnu

Clock Get Attributes

osfmk/man/clock_get_attributes.html

latest1.7 KB
Original Source

clock_get_attributes


Function - Return attributes of a clock.

SYNOPSIS

**kern\_return\_t clock\_get\_attributes**** (clock\_t **clock\_name,** clock\_flavor\_t **flavor,** clock\_attr\_t **attribute,** mach\_msg\_type\_number\_t **attribute\_count** );**

PARAMETERS

clock_name[in clock-name send right] The name (or control) port for the clock.

flavor[in scalar] Type of information desired. Defined values are:

CLOCK_GET_TIME_RES The resolution, in nanoseconds, with which the value returned by clock_get_time is updated.

CLOCK_MAP_TIME_RES The resolution, in nanoseconds, with which the value visible via clock_map_time is updated.

CLOCK_ALARM_CURRES The resolution, in nanoseconds, at which clock alarm and sleep timers are currently serviced.

CLOCK_ALARM_MINRES The minimum resolution, in nanoseconds, at which clock alarm and sleep timers can be serviced.

CLOCK_ALARM_MAXRES The maximum resolution, in nanoseconds, at which clock alarm and sleep timers can be serviced.

attribute[out scalar] The returned attribute.

attribute_count[in/out scalar] On input, the maximum size of the buffer; on output, the size returned (in natural-sized units).

DESCRIPTION

The clock_get_attributes function returns attributes of a clock's implementation or operation.

RETURN VALUES

Only generic errors apply.

Functions: host_get_clock_service, clock_get_time, clock_map_time, clock_sleep, clock_alarm, clock_set_attributes.