1# zx_clock_get 2 3## NAME 4 5<!-- Updated by update-docs-from-abigen, do not edit. --> 6 7clock_get - 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_time_t zx_clock_get(zx_clock_t clock_id); 17``` 18 19## DESCRIPTION 20 21`zx_clock_get()` returns the current time of *clock_id*, or 0 if *clock_id* is 22invalid. 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()` returns the current time according to the given clock ID. 41 42## ERRORS 43 44On error, `zx_clock_get()` returns 0. 45