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/reqrep.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/reqrep.c') diff --git a/tests/reqrep.c b/tests/reqrep.c index c31f0212..ada21875 100644 --- a/tests/reqrep.c +++ b/tests/reqrep.c @@ -31,8 +31,8 @@ TestMain("REQ/REP pattern", { Convey("Resend time option id works", { // Set timeout. - So(nng_setopt_usec( - req, NNG_OPT_REQ_RESENDTIME, 10000) == 0); + So(nng_setopt_ms(req, NNG_OPT_REQ_RESENDTIME, 10) == + 0); // Check invalid size So(nng_setopt(req, NNG_OPT_REQ_RESENDTIME, "", 1) == NNG_EINVAL); @@ -66,7 +66,7 @@ TestMain("REQ/REP pattern", { }); Convey("Cannot set resend time", { - So(nng_setopt_usec(rep, NNG_OPT_REQ_RESENDTIME, 100) == + So(nng_setopt_ms(rep, NNG_OPT_REQ_RESENDTIME, 100) == NNG_ENOTSUP); }); }); @@ -114,10 +114,10 @@ TestMain("REQ/REP pattern", { }); Convey("Request cancellation works", { - nng_msg *abc; - nng_msg *def; - nng_msg *cmd; - uint64_t retry = 100000; // 100 ms + nng_msg * abc; + nng_msg * def; + nng_msg * cmd; + nng_duration retry = 100; // 100 ms nng_socket req; nng_socket rep; @@ -131,7 +131,7 @@ TestMain("REQ/REP pattern", { nng_close(req); }); - So(nng_setopt_usec(req, NNG_OPT_REQ_RESENDTIME, retry) == 0); + So(nng_setopt_ms(req, NNG_OPT_REQ_RESENDTIME, retry) == 0); So(nng_setopt_int(req, NNG_OPT_SENDBUF, 16) == 0); So(nng_msg_alloc(&abc, 0) == 0); -- cgit v1.2.3-70-g09d2