zx_clock_get_details

NAME

Fetch all of the low level details of the clock’s current status.

SYNOPSIS

  1. #include <zircon/syscalls.h>
  2. zx_status_t zx_clock_get_details(zx_handle_t handle,
  3. uint64_t options,
  4. void* details);

RIGHTS

handle must be of type ZX_OBJ_TYPE_CLOCK and have ZX_RIGHT_READ.

DESCRIPTION

Fetches the fine grained details of the clock object. See clocks for the specifics of the details reported. Currently, there is only one details structure defined for clocks, zx_clock_details_v1_t. Users must specify the version of the structure using the options parameter as well as providing at least sizeof(zx_clock_details_v1_t) bytes of storage via the details. For example:

  1. #include <zircon/syscalls.h>
  2. #include <zircon/syscalls/clock.h>
  3. void GetSomeDetails(zx_handle_t the_clock) {
  4. zx_clock_details_v1_t details;
  5. zx_status_t status;
  6. status = zx_clock_get_details(the_clock, ZX_CLOCK_ARGS_VERSION(1), &details);
  7. if (status == ZX_OK) {
  8. // Do great things with our details.
  9. }
  10. }

RETURN VALUE

On success, returns ZX_OK along with clock details stored in the details out parameter.

ERRORS

  • ZX_ERR_BAD_HANDLE : handle is either an invalid handle, or a handle to an object type that is not ZX_OBJ_TYPE_CLOCK.
  • ZX_ERR_ACCESS_DENIED : handle lacks the ZX_RIGHT_READ right.
  • ZX_ERR_INVALID_ARGS : The version of the details structure signaled by options is invalid, or the pointer of the structure passed via details is bad.

SEE ALSO