diff options
| author | Garrett D'Amore <garrett@damore.org> | 2023-12-30 19:35:24 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2023-12-30 19:38:01 -0800 |
| commit | 838c9eab97c9d954354db711faae8a1fa6c12d38 (patch) | |
| tree | 8cf3a21772402dfac8cdd4339254ce8b9fcf601b /docs/man | |
| parent | 9b26b72907539910dba42d7396747d18cc020435 (diff) | |
| download | nng-838c9eab97c9d954354db711faae8a1fa6c12d38.tar.gz nng-838c9eab97c9d954354db711faae8a1fa6c12d38.tar.bz2 nng-838c9eab97c9d954354db711faae8a1fa6c12d38.zip | |
fixes #1751 Support nng_aio_set_expire().
While here fixed a number of nits in comments.
Diffstat (limited to 'docs/man')
| -rw-r--r-- | docs/man/nng_aio_set_timeout.3.adoc | 11 | ||||
| -rw-r--r-- | docs/man/nng_clock.3supp.adoc | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/docs/man/nng_aio_set_timeout.3.adoc b/docs/man/nng_aio_set_timeout.3.adoc index 0d544d59..a82b0c83 100644 --- a/docs/man/nng_aio_set_timeout.3.adoc +++ b/docs/man/nng_aio_set_timeout.3.adoc @@ -1,6 +1,6 @@ = nng_aio_set_timeout(3) // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2023 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 @@ -21,6 +21,9 @@ nng_aio_set_timeout - set asynchronous I/O timeout typedef int nng_duration; void nng_aio_set_timeout(nng_aio *aio, nng_duration timeout); + +typedef uint64_t nng_time; +void nng_aio_set_expire(nng_aio *aio, nng_time expiration); ---- == DESCRIPTION @@ -37,6 +40,12 @@ If the timeout is `NNG_DURATION_DEFAULT`, then a "default" or socket-specific timeout is used. (This is frequently the same as `NNG_DURATION_INFINITE`.) +The `nng_aio_set_expire()` function is similar to `nng_aio_set_timeout()`, but sets +an absolute expiration time based on the system clock. The _expiration_ +is expressed as a number of milliseconds since some point in the past. +The xref:nng_clock.3supp.adoc[`nng_clock()`] function can be used to determine +the current value of the clock. + TIP: As most operations involve some context switching, it is usually a good idea to allow at least a few tens of milliseconds before timing them out -- a too small timeout might not allow the operation to properly begin before diff --git a/docs/man/nng_clock.3supp.adoc b/docs/man/nng_clock.3supp.adoc index 500134c5..d413f1b2 100644 --- a/docs/man/nng_clock.3supp.adoc +++ b/docs/man/nng_clock.3supp.adoc @@ -32,7 +32,7 @@ arbitrary time in the past. The resolution of the clock depends on the underlying timing facilities of the system. This function may be used for timing, but applications should not expect -very fine grained values. +very fine-grained values. IMPORTANT: The reference time will be the same for a given program, but different programs may have different references. |
