Perform a basic read of a mapped clock‘s state. Behaves identically to a call to zx_clock_read(), 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 read. See mappable clocks for more details.
#include <zircon/syscalls.h> zx_status_t zx_clock_read_mapped(const void* clock_addr, zx_time_t* now);
No handle is needed in order to perform a successful read, 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()
Perform a basic read of the clock's mapped state, and return its current time in the now out parameter.
On success, returns ZX_OK along with the clock's current time in the now output parameter.
Any attempt to pass a virtual pointer for clock_addr which was:
zx_clock_map().Will result in undefined behavior.