diff options
| -rw-r--r-- | docs/man/nng_duration.5.adoc | 50 | ||||
| -rw-r--r-- | docs/ref/SUMMARY.md | 1 | ||||
| -rw-r--r-- | docs/ref/api/util/index.md | 1 | ||||
| -rw-r--r-- | docs/ref/api/util/nng_duration.md | 33 |
4 files changed, 35 insertions, 50 deletions
diff --git a/docs/man/nng_duration.5.adoc b/docs/man/nng_duration.5.adoc deleted file mode 100644 index fbd172b9..00000000 --- a/docs/man/nng_duration.5.adoc +++ /dev/null @@ -1,50 +0,0 @@ -= nng_duration(5) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_duration - relative time in milliseconds - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef int32_t nng_duration; - -#define NNG_DURATION_INFINITE (-1) -#define NNG_DURATION_DEFAULT (-2) -#define NNG_DURATION_ZERO (0) ----- - -== DESCRIPTION - -An `nng_duration`(((duration))) is a relative time, measured in -milliseconds. -This type is most often used in conjunction with timers and timeouts. - -A couple of special values have been set aside, and carry special meanings. - -((`NNG_DURATION_DEFAULT`))::: -Indicates a context-specific default value should be used. - -((`NNG_DURATION_INFINITE`))::: -Effectively an infinite duration; used most often to disable timeouts. - -((`NNG_DURATION_ZERO`))::: -Zero length duration; used to perform a single polling operation. - -== SEE ALSO - -[.text-left] -xref:nng_options.5.adoc[nng_options(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/ref/SUMMARY.md b/docs/ref/SUMMARY.md index d6663a78..c994ecd5 100644 --- a/docs/ref/SUMMARY.md +++ b/docs/ref/SUMMARY.md @@ -12,6 +12,7 @@ - [nng_alloc](./api/util/nng_alloc.md) - [nng_clock](./api/util/nng_clock.md) + - [nng_duration](./api/util/nng_duration.md) - [nng_id_map](./api/util/nng_id_map.md) - [nng_msleep](./api/util/nng_msleep.md) - [nng_opts_parse](./api/util/nng_opts_parse.md) diff --git a/docs/ref/api/util/index.md b/docs/ref/api/util/index.md index 0650c21d..0a3cb891 100644 --- a/docs/ref/api/util/index.md +++ b/docs/ref/api/util/index.md @@ -7,6 +7,7 @@ of other uses. - [nng_alloc](nng_alloc.md) --- allocate memory - [nng_clock](nng_clock.md) --- get time +- [nng_duration](nng_duration.md) -- relative time in milliseconds - [nng_id_map](nng_id_map.md) --- identifier based mapping table - [nng_msleep](nng_msleep.md) --- sleep milliseconds - [nng_opts_parse](nng_opts_parse.md) --- parse command line options diff --git a/docs/ref/api/util/nng_duration.md b/docs/ref/api/util/nng_duration.md new file mode 100644 index 00000000..9ad76256 --- /dev/null +++ b/docs/ref/api/util/nng_duration.md @@ -0,0 +1,33 @@ +# nng_duration + +## NAME + +nng_duration --- relative time in milliseconds + +## SYNOPSIS + +```c +#include <nng/nng.h> + +typedef int32_t nng_duration; + +#define NNG_DURATION_INFINITE (-1) +#define NNG_DURATION_DEFAULT (-2) +#define NNG_DURATION_ZERO (0) +``` + +## DESCRIPTION + +An {{i:`nng_duration`}}{{hi:duration}} is a relative time, measured in {{i:milliseconds}}. +This type is most often used in conjunction with timers and timeouts. + +A couple of special values have been set aside, and carry special meanings. + +- {{i:`NNG_DURATION_DEFAULT`}}: + Indicates a context-specific default value should be used. + +- {{i:`NNG_DURATION_INFINITE`}}: + Effectively an infinite duration; used most often to disable timeouts. + +- {{i:`NNG_DURATION_ZERO`}}: + Zero length duration; used to perform an immediate poll. |
