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. --- tests/scalability.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/scalability.c') diff --git a/tests/scalability.c b/tests/scalability.c index 22b66d10..b1a9b767 100644 --- a/tests/scalability.c +++ b/tests/scalability.c @@ -48,15 +48,15 @@ stop(void) int openclients(nng_socket *clients, int num) { - int rv; - int i; - uint64_t t; + int rv; + int i; + nng_duration t; for (i = 0; i < num; i++) { - t = 100000; // 100ms + t = 100; // 100ms nng_socket c; if (((rv = nng_req_open(&c)) != 0) || - ((rv = nng_setopt_usec(c, NNG_OPT_RECVTIMEO, t)) != 0) || - ((rv = nng_setopt_usec(c, NNG_OPT_SENDTIMEO, t)) != 0) || + ((rv = nng_setopt_ms(c, NNG_OPT_RECVTIMEO, t)) != 0) || + ((rv = nng_setopt_ms(c, NNG_OPT_SENDTIMEO, t)) != 0) || ((rv = nng_dial(c, addr, NULL, 0)) != 0)) { return (rv); } -- cgit v1.2.3-70-g09d2