From commits-return-47630-archive-asf-public=cust-asf.ponee.io@qpid.apache.org Fri Dec 14 22:37:14 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 19ED6180679 for ; Fri, 14 Dec 2018 22:37:13 +0100 (CET) Received: (qmail 99687 invoked by uid 500); 14 Dec 2018 21:37:13 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 99678 invoked by uid 99); 14 Dec 2018 21:37:13 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Dec 2018 21:37:13 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id B6C3285275; Fri, 14 Dec 2018 21:37:12 +0000 (UTC) Date: Fri, 14 Dec 2018 21:37:12 +0000 To: "commits@qpid.apache.org" Subject: [qpid-proton] branch master updated: PROTON-985: Modify pn_transport_tick to use a monotonic clock. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <154482343267.21083.8443659152813578591@gitbox.apache.org> From: aconway@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: qpid-proton X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: a2aa7642c2cb7803337af26c0bf7647cf01b602c X-Git-Newrev: a051803e0fb25cef2f25e829bac6c516ab0aab7c X-Git-Rev: a051803e0fb25cef2f25e829bac6c516ab0aab7c X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. aconway pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/qpid-proton.git The following commit(s) were added to refs/heads/master by this push: new a051803 PROTON-985: Modify pn_transport_tick to use a monotonic clock. a051803 is described below commit a051803e0fb25cef2f25e829bac6c516ab0aab7c Author: Alan Conway AuthorDate: Fri Dec 14 14:02:37 2018 -0500 PROTON-985: Modify pn_transport_tick to use a monotonic clock. --- c/include/proton/transport.h | 5 +++-- c/src/core/transport.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/c/include/proton/transport.h b/c/include/proton/transport.h index cf965c5..e9f3288 100644 --- a/c/include/proton/transport.h +++ b/c/include/proton/transport.h @@ -680,7 +680,8 @@ PN_EXTERN bool pn_transport_closed(pn_transport_t *transport); * * * @param[in] transport the transport to process. - * @param[in] now the current time + * @param[in] now A monotonically-increasing time value in milliseconds. + * Does not need to be wall-clock time or a valid AMQP timestamp, but must increase montonically. * * @return if non-zero, then the expiration time of the next pending timer event for the * transport. The caller must invoke pn_transport_tick again at least once at or before @@ -688,7 +689,7 @@ PN_EXTERN bool pn_transport_closed(pn_transport_t *transport); * * @internal XXX Deprecate when tick is added to connection driver */ -PN_EXTERN pn_timestamp_t pn_transport_tick(pn_transport_t *transport, pn_timestamp_t now); +PN_EXTERN pn_timestamp_t pn_transport_tick(pn_transport_t *transport, int64_t now); /** * **Deprecated** - No replacement. diff --git a/c/src/core/transport.c b/c/src/core/transport.c index 545897a..87c9351 100644 --- a/c/src/core/transport.c +++ b/c/src/core/transport.c @@ -2909,7 +2909,7 @@ pn_millis_t pn_transport_get_remote_idle_timeout(pn_transport_t *transport) return transport->remote_idle_timeout; } -pn_timestamp_t pn_transport_tick(pn_transport_t *transport, pn_timestamp_t now) +pn_timestamp_t pn_transport_tick(pn_transport_t *transport, int64_t now) { pn_timestamp_t r = 0; for (int i = 0; i