diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-16 00:43:03 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-16 00:43:03 -0800 |
| commit | 39dbff5615631522d3ef98b83141957038502c0d (patch) | |
| tree | 89becbf88ebb79df9c9202450acd476bd790bde0 /tests/sock.c | |
| parent | f71209a0b429cddcd44f1f2473c49e986c9b4be7 (diff) | |
| download | nng-39dbff5615631522d3ef98b83141957038502c0d.tar.gz nng-39dbff5615631522d3ef98b83141957038502c0d.tar.bz2 nng-39dbff5615631522d3ef98b83141957038502c0d.zip | |
Various complaints found in AppVeyor build.
Diffstat (limited to 'tests/sock.c')
| -rw-r--r-- | tests/sock.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/tests/sock.c b/tests/sock.c index 8863023c..7d1d226b 100644 --- a/tests/sock.c +++ b/tests/sock.c @@ -8,38 +8,11 @@ // #include "convey.h" +#include "stubs.h" #include "nng.h" #include <string.h> -#ifndef _WIN32 -#include <sys/time.h> -#endif - -uint64_t -getms(void) -{ -#ifdef _WIN32 - return (GetTickCount64()) ; -#else - static time_t epoch; - struct timeval tv; - - if (epoch == 0) { - epoch = time(NULL); - } - gettimeofday(&tv, NULL); - - if (tv.tv_sec < epoch) { - // Broken clock. - // This will force all other timing tests to fail - return (0); - } - tv.tv_sec -= epoch; - return (((uint64_t)(tv.tv_sec ) * 1000) + (tv.tv_usec / 1000)); -#endif -} - TestMain("Socket Operations", { Convey("We are able to open a PAIR socket", { int rv; |
