diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-08-14 21:58:02 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-08-14 21:58:02 -0700 |
| commit | b47a223bfb2c7114154504ec8d6cdac5abd0b884 (patch) | |
| tree | a9f70f7e3ca9d00a77fb2026daf5f1c3ba0cf013 /tests/pair1.c | |
| parent | 6655557fca28408e0eeac3ba80b9e2bbdeada389 (diff) | |
| download | nng-b47a223bfb2c7114154504ec8d6cdac5abd0b884.tar.gz nng-b47a223bfb2c7114154504ec8d6cdac5abd0b884.tar.bz2 nng-b47a223bfb2c7114154504ec8d6cdac5abd0b884.zip | |
Convert duration to usec.
Diffstat (limited to 'tests/pair1.c')
| -rw-r--r-- | tests/pair1.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/pair1.c b/tests/pair1.c index aa86883b..08691fd4 100644 --- a/tests/pair1.c +++ b/tests/pair1.c @@ -44,11 +44,11 @@ TestMain("PAIRv1 protocol", { So(nng_pair1_open(&c2) == 0); tmo = 300000; - So(nng_setopt_duration(s1, NNG_OPT_RCVTIMEO, tmo) == 0); - So(nng_setopt_duration(c1, NNG_OPT_RCVTIMEO, tmo) == 0); - So(nng_setopt_duration(c2, NNG_OPT_RCVTIMEO, tmo) == 0); + So(nng_setopt_usec(s1, NNG_OPT_RCVTIMEO, tmo) == 0); + So(nng_setopt_usec(c1, NNG_OPT_RCVTIMEO, tmo) == 0); + So(nng_setopt_usec(c2, NNG_OPT_RCVTIMEO, tmo) == 0); tmo = 0; - So(nng_getopt_duration(s1, NNG_OPT_RCVTIMEO, &tmo) == 0); + So(nng_getopt_usec(s1, NNG_OPT_RCVTIMEO, &tmo) == 0); So(tmo == 300000); Convey("Monogamous cooked mode works", { @@ -113,8 +113,7 @@ TestMain("PAIRv1 protocol", { So(nng_setopt_int(s1, NNG_OPT_RCVBUF, 1) == 0); So(nng_setopt_int(s1, NNG_OPT_SNDBUF, 1) == 0); So(nng_setopt_int(c1, NNG_OPT_RCVBUF, 1) == 0); - So(nng_setopt_duration(s1, NNG_OPT_SNDTIMEO, 100000) == - 0); + So(nng_setopt_usec(s1, NNG_OPT_SNDTIMEO, 100000) == 0); So(nng_listen(s1, addr, NULL, 0) == 0); So(nng_dial(c1, addr, NULL, 0) == 0); @@ -138,8 +137,7 @@ TestMain("PAIRv1 protocol", { So(nng_setopt_int(s1, NNG_OPT_RCVBUF, 1) == 0); So(nng_setopt_int(s1, NNG_OPT_SNDBUF, 1) == 0); So(nng_setopt_int(c1, NNG_OPT_RCVBUF, 1) == 0); - So(nng_setopt_duration(s1, NNG_OPT_SNDTIMEO, 30000) == - 0); + So(nng_setopt_usec(s1, NNG_OPT_SNDTIMEO, 30000) == 0); So(nng_listen(s1, addr, NULL, 0) == 0); So(nng_dial(c1, addr, NULL, 0) == 0); |
