X-Git-Url: http://git.meshlink.io/?p=utcp;a=blobdiff_plain;f=test.c;fp=test.c;h=2a273de70463dbe4f39117cc50ed438dc46c4834;hp=300ce51e4d3a0cb8f636038a7ca8b766f4c7e39c;hb=723d8c8b2d96834135f00c0ac4147282e1f0cc2c;hpb=41112d3f0b47bf28cdf4b12798b4588c74005e46 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);