From aee94fffc2cb51d23e10d3acb08fbd2250e49065 Mon Sep 17 00:00:00 2001
From: Garrett D'Amore <garrett@damore.org>
Date: Wed, 2 Jun 2021 08:08:52 -0700
Subject: fixes #1450 nng_cv_until documentation bug

---
 docs/man/nng_cv_until.3supp.adoc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'docs/man/nng_cv_until.3supp.adoc')

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. <info@staysail.tech>
+// Copyright 2021 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
@@ -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

