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/bus.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/bus.c') diff --git a/tests/bus.c b/tests/bus.c index 3cf785d9..dd36d5a5 100644 --- a/tests/bus.c +++ b/tests/bus.c @@ -37,10 +37,10 @@ TestMain("BUS pattern", { }); Convey("We can create a linked BUS topology", { - nng_socket bus1; - nng_socket bus2; - nng_socket bus3; - uint64_t rtimeo; + nng_socket bus1; + nng_socket bus2; + nng_socket bus3; + nng_duration rtimeo; So(nng_bus_open(&bus1) == 0); So(nng_bus_open(&bus2) == 0); @@ -56,10 +56,10 @@ TestMain("BUS pattern", { So(nng_dial(bus2, addr, NULL, 0) == 0); So(nng_dial(bus3, addr, NULL, 0) == 0); - rtimeo = 50000; - So(nng_setopt_usec(bus1, NNG_OPT_RECVTIMEO, rtimeo) == 0); - So(nng_setopt_usec(bus2, NNG_OPT_RECVTIMEO, rtimeo) == 0); - So(nng_setopt_usec(bus3, NNG_OPT_RECVTIMEO, rtimeo) == 0); + rtimeo = 50; + So(nng_setopt_ms(bus1, NNG_OPT_RECVTIMEO, rtimeo) == 0); + So(nng_setopt_ms(bus2, NNG_OPT_RECVTIMEO, rtimeo) == 0); + So(nng_setopt_ms(bus3, NNG_OPT_RECVTIMEO, rtimeo) == 0); Convey("Messages delivered", { nng_msg *msg; -- cgit v1.2.3-70-g09d2