[syscalls][docs] Split clock_get and clock_get_new and generate synopsis
ZX-559 #comment [syscalls][docs] Split clock_get and clock_get_new and generate synopsis
ZX-968 #comment [syscalls][docs] Split clock_get and clock_get_new and generate synopsis
Test: CQ
Change-Id: I6421b186081a0e8ce18907d993c322caee431942
diff --git a/docs/syscalls/clock_get.md b/docs/syscalls/clock_get.md
index 5579ec0..8272fb9 100644
--- a/docs/syscalls/clock_get.md
+++ b/docs/syscalls/clock_get.md
@@ -8,10 +8,11 @@
## SYNOPSIS
+<!-- Updated by scripts/update-docs-from-abigen, do not edit this section manually. -->
+
```
#include <zircon/syscalls.h>
-zx_status_t zx_clock_get_new(uint32_t clock_id, zx_time_t* out_time);
zx_time_t zx_clock_get(zx_clock_t clock_id);
```
@@ -20,9 +21,6 @@
**zx_clock_get**() returns the current time of *clock_id*, or 0 if *clock_id* is
invalid.
-**zx_clock_get_new** returns the current time of *clock_id* via
- *out_time*, and returns whether *clock_id* was valid.
-
## SUPPORTED CLOCK IDS
*ZX_CLOCK_MONOTONIC* number of nanoseconds since the system was powered on.
@@ -41,10 +39,6 @@
On success, **zx_clock_get**() returns the current time according to the given clock ID.
-On success, **zx_clock_get_new**() returns *ZX_OK*.
-
## ERRORS
-On error, **zx_clock_get**() currently returns 0.
-
-**ZX_ERR_INVALID_ARGS** *clock_id* is not a valid clock id, or *out_time* is an invalid pointer.
+On error, **zx_clock_get**() returns 0.
diff --git a/docs/syscalls/clock_get_new.md b/docs/syscalls/clock_get_new.md
new file mode 100644
index 0000000..c82a24b
--- /dev/null
+++ b/docs/syscalls/clock_get_new.md
@@ -0,0 +1,44 @@
+# zx_clock_get_new
+
+## NAME
+
+<!-- Updated by scripts/update-docs-from-abigen, do not edit this section manually. -->
+
+clock_get_new - Acquire the current time.
+
+## SYNOPSIS
+
+<!-- Updated by scripts/update-docs-from-abigen, do not edit this section manually. -->
+
+```
+#include <zircon/syscalls.h>
+
+zx_status_t zx_clock_get_new(zx_clock_t clock_id, zx_time_t* out);
+```
+
+## DESCRIPTION
+
+**zx_clock_get_new** returns the current time of *clock_id* via
+ *out*, and returns whether *clock_id* was valid.
+
+## SUPPORTED CLOCK IDS
+
+*ZX_CLOCK_MONOTONIC* number of nanoseconds since the system was powered on.
+
+*ZX_CLOCK_UTC* number of wall clock nanoseconds since the Unix epoch (midnight on January 1 1970) in UTC
+
+*ZX_CLOCK_THREAD* number of nanoseconds the current thread has been running for.
+
+## RIGHTS
+
+<!-- Updated by scripts/update-docs-from-abigen, do not edit this section manually. -->
+
+TODO(ZX-2399)
+
+## RETURN VALUE
+
+On success, **zx_clock_get_new**() returns *ZX_OK*.
+
+## ERRORS
+
+**ZX_ERR_INVALID_ARGS** *clock_id* is not a valid clock id, or *out* is an invalid pointer.
diff --git a/scripts/update-docs-from-abigen b/scripts/update-docs-from-abigen
index efd2914..a7c35f6 100755
--- a/scripts/update-docs-from-abigen
+++ b/scripts/update-docs-from-abigen
@@ -383,7 +383,6 @@
# which makes the hand written DESCRIPTION block wrong if they're changed. This
# will be deleted once all can be generated.
synopsis_blacklist = (
- 'clock_get',
'futex_get_owner',
'futex_requeue',
'futex_wait',
diff --git a/system/public/zircon/syscalls.abigen b/system/public/zircon/syscalls.abigen
index 59d8f12..e976ca2 100644
--- a/system/public/zircon/syscalls.abigen
+++ b/system/public/zircon/syscalls.abigen
@@ -54,6 +54,7 @@
(clock_id: zx_clock_t)
returns (zx_time_t);
+#^ Acquire the current time.
syscall clock_get_new
(clock_id: zx_clock_t)
returns (zx_status_t, out: zx_time_t);