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/compat_reqrep.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/compat_reqrep.c') diff --git a/tests/compat_reqrep.c b/tests/compat_reqrep.c index 51ff4fb8..046955cf 100644 --- a/tests/compat_reqrep.c +++ b/tests/compat_reqrep.c @@ -1,5 +1,7 @@ /* Copyright (c) 2012 Martin Sustrik All rights reserved. + Copyright 2017 Garrett D'Amore + Copyright 2017 Capitar IT Group BV Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -26,8 +28,6 @@ #define SOCKET_ADDRESS "inproc://test" -extern void nng_usleep(uint64_t); - int main () { int rc; @@ -75,7 +75,7 @@ int main () rep1 = test_socket (AF_SP, NN_REP); test_connect (rep1, SOCKET_ADDRESS); - nng_usleep(10000); // ensure rep1 binds before rep2 + nn_sleep(10); // ensure rep1 binds before rep2 rep2 = test_socket (AF_SP, NN_REP); test_connect (rep2, SOCKET_ADDRESS); @@ -86,7 +86,7 @@ int main () test_setsockopt (rep2, NN_SOL_SOCKET, NN_RCVTIMEO, &timeo, sizeof (timeo)); // Give time for connections to settle -- required for LB stuff. - nng_usleep(100000); + nn_sleep(100); test_send (req1, "ABC"); test_recv (rep1, "ABC"); @@ -148,7 +148,7 @@ int main () rep1 = test_socket (AF_SP, NN_REP); test_connect (rep1, SOCKET_ADDRESS); rep2 = test_socket (AF_SP, NN_REP); - nng_usleep(10000); // give time for rep1 to connect + nn_sleep (10); // give time for rep1 to connect test_connect (rep2, SOCKET_ADDRESS); timeo = 500; // Was 200, but Windows occasionally fails at that rate. -- cgit v1.2.3-70-g09d2