From aee94fffc2cb51d23e10d3acb08fbd2250e49065 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 2 Jun 2021 08:08:52 -0700 Subject: fixes #1450 nng_cv_until documentation bug --- docs/man/nng_aio_set_iov.3.adoc | 2 +- docs/man/nng_cv_until.3supp.adoc | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/man/nng_aio_set_iov.3.adoc b/docs/man/nng_aio_set_iov.3.adoc index 26c2789a..83128011 100644 --- a/docs/man/nng_aio_set_iov.3.adoc +++ b/docs/man/nng_aio_set_iov.3.adoc @@ -1,6 +1,6 @@ = nng_aio_set_iov(3) // -// Copyright 2020 Staysail Systems, Inc. +// Copyright 2021 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This document is supplied under the terms of the MIT License, a diff --git a/docs/man/nng_cv_until.3supp.adoc b/docs/man/nng_cv_until.3supp.adoc index 87ba879c..9cf7c714 100644 --- a/docs/man/nng_cv_until.3supp.adoc +++ b/docs/man/nng_cv_until.3supp.adoc @@ -1,6 +1,6 @@ = nng_cv_until(3supp) // -// Copyright 2018 Staysail Systems, Inc. +// Copyright 2021 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This document is supplied under the terms of the MIT License, a @@ -49,9 +49,10 @@ The following example demonstrates use of this function: [source, c] ---- + expire = nng_clock() + 1000; // 1 second in the future nng_mtx_lock(m); // assume cv was allocated using m while (!condition_true) { - if (nng_cv_wait(cv) == NNG_ETIMEDOUT) { + if (nng_cv_until(cv, expire) == NNG_ETIMEDOUT) { printf("Time out reached!\n"); break; } -- cgit v1.2.3-70-g09d2