# zx_clock_get_details_mapped

## Summary

Fetch all of the low level details of a mapped clock's current state. Behaves identically to
a call to [`zx_clock_get_details()`](https://fuchsia.dev/reference/syscalls/clock_get_details), however it operates on a mapped clock's state
instead of a clock handle, and may offer performance benefits as it usually does not need to
enter the Zircon kernel in order to perform the observation. See [mappable clocks](https://fuchsia.dev/docs/reference/kernel_objects/clock#mappable_clocks) for more
details.

## Declaration

    #include <zircon/syscalls.h>

    zx_status_t zx_clock_get_details_mapped(const void* clock_addr,
                                            uint64_t options,
                                            void* details);

## Rights

No handle is needed in order to perform a successful observation, therefore no specific
handle rights are needed either. Instead, the user must provide the virtual address of a
currently valid clock state mapping, established using [`zx_vmar_map_clock()`](https://fuchsia.dev/reference/syscalls/vmar_map_clock)

## Description

Fetches the fine grained details of the mapped clock's state. See
[clocks](https://fuchsia.dev/docs/reference/kernel_objects/clock) Please refer to the
[current description of `zx_clock_get_details()`](https://fuchsia.dev/reference/syscalls/clock_get_details#Description)
for more information, including an example.

## Return value

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

## Errors

Any attempt to pass a virtual pointer for `clock_addr` which was:

- Not the value returned by the original call to `zx_clock_map()`.
- A pointer to clock state which has been either partially, or completely, unmapped.

Will result in undefined behavior.

## See also

- [clock transformations](https://fuchsia.dev/docs/concepts/kernel/clock_transformations)
- [clocks](https://fuchsia.dev/docs/reference/kernel_objects/clock)
- [mappable clocks](https://fuchsia.dev/docs/reference/kernel_objects/clock#mappable_clocks)
- [`zx_clock_create()`](https://fuchsia.dev/reference/syscalls/clock_create)
- [`zx_clock_get_details()`](https://fuchsia.dev/reference/syscalls/clock_get_details)
- [`zx_vmar_map_clock()`](https://fuchsia.dev/reference/syscalls/vmar_map_clock)