bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] Re: GNULib Module gettime Breaks CVS Build On Windows


From: Derek Robert Price
Subject: [Bug-gnulib] Re: GNULib Module gettime Breaks CVS Build On Windows
Date: Wed, 12 May 2004 11:34:37 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim.Hyslop wrote:

>I wrote:
>
>>BTW, I'm also experimenting with the select() workaround (to
>>overcome Sleep()'s 10 ms granularity) - just in case this is
>>another function that accepts a high-resolution input but
>>makes it lower resolution under the hood. I'll post the
>>results as soon as I have finished.
>
>
>Bad news. It appears that select() will still wait about 10 milliseconds
>before timing out, even if you specify 1 microsecond as the delay.
>
>I ran my test program (below) 6 times with a 100 microsecond timeout, and
>the times reported were 10.0118, 10.0125, 10.0125, 10.0124, 10.0124, and
>10.0124 milliseconds. Running it with a 1 microsecond timeout had no
effect
>on the output.


That's no worse than the 10ms granularity of the Sleep() command,
however, so since select() is the most portable solution across UNIX
systems, accepts micorsecond resolution even on Windows, and only the
additional inclusion of <winsock.h> would be necessary in nanosleep.c
on Windows to enable the select() function there, select() is probably
still our best option.  If Windows ever updates their select() to use
the finer timeout granularity, then we would inherit that new behavior.

Derek

- --
                *8^)

Email: address@hidden

Get CVS support at <http://ximbiot.com>!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAokQMLD1OTBfyMaQRAgNGAJsF+zOnZxMqTmUovNJE7zKIhQUW6QCdEQF1
8EtXAe3xKcG4/5/O4l8KHw4=
=wXcT
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]