From: Nikos Mavrogiannopoulos Date: Sat, 25 Feb 2012 12:04:38 +0000 (+0100) Subject: provide accurate value to select X-Git-Tag: gnutls_3_0_15~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd86118a9dec58bf720780291b93f12150841cea;p=thirdparty%2Fgnutls.git provide accurate value to select --- diff --git a/src/udp-serv.c b/src/udp-serv.c index 489a577775..c4a376b499 100644 --- a/src/udp-serv.c +++ b/src/udp-serv.c @@ -190,7 +190,13 @@ char c; tv.tv_sec = 0; tv.tv_usec = ms * 1000; - + + while(tv.tv_usec >= 1000000) + { + tv.tv_usec -= 1000000; + tv.tv_sec++; + } + ret = select(priv->fd+1, &rfds, NULL, NULL, &tv); if (ret <= 0)