diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-18 10:06:59 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-18 10:06:59 -0800 |
| commit | c44386d110f5f335a34cc964768ab14d36b6dd36 (patch) | |
| tree | 76e56433e337d70a1058d94db546586508bdc85b /tests/sock.c | |
| parent | 7e844cf618d67675928fb4c6fadc6cc16db19d19 (diff) | |
| download | nng-c44386d110f5f335a34cc964768ab14d36b6dd36.tar.gz nng-c44386d110f5f335a34cc964768ab14d36b6dd36.tar.bz2 nng-c44386d110f5f335a34cc964768ab14d36b6dd36.zip | |
Windows compilation fixes.
Diffstat (limited to 'tests/sock.c')
| -rw-r--r-- | tests/sock.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/sock.c b/tests/sock.c index 6a122cdf..123354ac 100644 --- a/tests/sock.c +++ b/tests/sock.c @@ -8,7 +8,6 @@ // #include "convey.h" -#include "stubs.h" #include "nng.h" #include "core/nng_impl.h" @@ -47,7 +46,7 @@ Main({ int64_t when = 500000; uint64_t now; - now = getms(); + now = nni_clock(); rv = nng_setopt(sock, NNG_OPT_RCVTIMEO, &when, sizeof (when)); @@ -55,8 +54,8 @@ Main({ rv = nng_recvmsg(sock, &msg, 0); So(rv == NNG_ETIMEDOUT); So(msg == NULL); - So(getms() >= (now + (when/1000))); - So(getms() < (now + ((when/1000) * 2))); + So(nni_clock() >= (now + when)); + So(nni_clock() < (now + (when * 2))); }) Convey("Recv nonblock with no pipes gives EAGAIN", { @@ -74,15 +73,15 @@ Main({ // We cheat to get access to the core's clock. So(nng_msg_alloc(&msg, 0) == 0); So(msg != NULL); - now = getms(); + now = nni_clock(); rv = nng_setopt(sock, NNG_OPT_SNDTIMEO, &when, sizeof (when)); So(rv == 0); rv = nng_sendmsg(sock, msg, 0); So(rv == NNG_ETIMEDOUT); - So(getms() >= (now + (when/1000))); - So(getms() < (now + ((when/1000) * 2))); + So(nni_clock() >= (now + when)); + So(nni_clock() < (now + (when * 2))); nng_msg_free(msg); }) |
