1# zx_clock_get_new 2 3## NAME 4 5<!-- Updated by update-docs-from-abigen, do not edit. --> 6 7clock_get_new - Acquire the current time. 8 9## SYNOPSIS 10 11<!-- Updated by update-docs-from-abigen, do not edit. --> 12 13``` 14#include <zircon/syscalls.h> 15 16zx_status_t zx_clock_get_new(zx_clock_t clock_id, zx_time_t* out); 17``` 18 19## DESCRIPTION 20 21`zx_clock_get_new()` returns the current time of *clock_id* via 22*out*, and returns whether *clock_id* was valid. 23 24## SUPPORTED CLOCK IDS 25 26**ZX_CLOCK_MONOTONIC** number of nanoseconds since the system was powered on. 27 28**ZX_CLOCK_UTC** number of wall clock nanoseconds since the Unix epoch (midnight on January 1 1970) in UTC 29 30**ZX_CLOCK_THREAD** number of nanoseconds the current thread has been running for. 31 32## RIGHTS 33 34<!-- Updated by update-docs-from-abigen, do not edit. --> 35 36TODO(ZX-2399) 37 38## RETURN VALUE 39 40On success, `zx_clock_get_new()` returns **ZX_OK**. 41 42## ERRORS 43 44**ZX_ERR_INVALID_ARGS** *clock_id* is not a valid clock id, or *out* is an invalid pointer. 45