From 4e668fdd5b5da0d46f97d835249dbe5f0ea319a7 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 19 Oct 2017 15:16:25 -0700 Subject: fixes #84 Consider using msec for durations There is now a public nng_duration type. We have also updated the zerotier work to work with the signed int64_t's that the latst ZeroTier dev branch is using. --- src/protocol/reqrep/req.c | 4 ++-- src/protocol/survey/survey.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/protocol') diff --git a/src/protocol/reqrep/req.c b/src/protocol/reqrep/req.c index 7d47b0b3..24d01df2 100644 --- a/src/protocol/reqrep/req.c +++ b/src/protocol/reqrep/req.c @@ -282,14 +282,14 @@ static int req_sock_setopt_resendtime(void *arg, const void *buf, size_t sz) { req_sock *s = arg; - return (nni_setopt_usec(&s->retry, buf, sz)); + return (nni_setopt_ms(&s->retry, buf, sz)); } static int req_sock_getopt_resendtime(void *arg, void *buf, size_t *szp) { req_sock *s = arg; - return (nni_getopt_usec(s->retry, buf, szp)); + return (nni_getopt_ms(s->retry, buf, szp)); } // Raw and cooked mode differ in the way they send messages out. diff --git a/src/protocol/survey/survey.c b/src/protocol/survey/survey.c index de9df7a5..1205402e 100644 --- a/src/protocol/survey/survey.c +++ b/src/protocol/survey/survey.c @@ -292,14 +292,14 @@ static int surv_sock_setopt_surveytime(void *arg, const void *buf, size_t sz) { surv_sock *s = arg; - return (nni_setopt_usec(&s->survtime, buf, sz)); + return (nni_setopt_ms(&s->survtime, buf, sz)); } static int surv_sock_getopt_surveytime(void *arg, void *buf, size_t *szp) { surv_sock *s = arg; - return (nni_getopt_usec(s->survtime, buf, szp)); + return (nni_getopt_ms(s->survtime, buf, szp)); } static void -- cgit v1.2.3-70-g09d2