Cygwin: Drop HZ usage in favor of MSPERSEC and CLOCKS_PER_SEC

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2018-02-12 22:08:42 +01:00
parent 58f72783ee
commit 01c643e49f
6 changed files with 25 additions and 19 deletions

View File

@ -1033,8 +1033,8 @@ cygwin_getsockopt (int fd, int level, int optname, void *optval,
}
else
{
time_out->tv_sec = ms / HZ;
time_out->tv_usec = ((ms % HZ) * USPERSEC) / HZ;
time_out->tv_sec = ms / MSPERSEC;
time_out->tv_usec = ((ms % MSPERSEC) * USPERSEC) / MSPERSEC;
}
*optlen = (socklen_t) sizeof *time_out;
res = 0;