X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test.c;h=2a273de70463dbe4f39117cc50ed438dc46c4834;hb=372fb44a395d6ded38d6e52472a0f2f330c232c3;hp=300ce51e4d3a0cb8f636038a7ca8b766f4c7e39c;hpb=1cd490633b3975e51163a96eadfa9b7490dc93a0;p=utcp diff --git a/test.c b/test.c index 300ce51..2a273de 100644 --- a/test.c +++ b/test.c @@ -291,7 +291,7 @@ int main(int argc, char *argv[]) { char buf[102400]; - struct timeval timeout = utcp_timeout(u); + struct timespec timeout = utcp_timeout(u); while(!connected || utcp_is_active(u)) { size_t max = c ? utcp_get_sndbuf_free(c) : 0; @@ -304,7 +304,7 @@ int main(int argc, char *argv[]) { max = read_size; } - int timeout_ms = timeout.tv_sec * 1000 + timeout.tv_usec / 1000 + 1; + int timeout_ms = timeout.tv_sec * 1000 + timeout.tv_nsec / 1000000 + 1; debug("polling, dir = %d, timeout = %d\n", dir, timeout_ms);