> Date: Thu, 11 Sep 2014 16:24:53 +0000
> From: Edward Thomson <ethom...@edwardthomson.com>
> Cc: bug-gnulib@gnu.org
> 
> On Thu, Sep 11, 2014 at 06:18:19PM +0300, Eli Zaretskii wrote:
> > 
> > Are you using the latest gnulib?  A similar problem in 'socket' was
> > fixed about 3 months ago (see commit aaaf546); since 'poll' calls
> > 'select', perhaps that fix also solves your problems in 'poll'?
> 
> I'm afraid it does not; we use only the poll compatibility function,
> and not select.  We use the select in ws2_32.dll.

Maybe if you import the select module from gnulib, in addition to
poll, the problem will be solved?

> > I believe you alluded to the fact that GetTickCount is not affected by
> > system clock adjustments.  That is true, but it is not strictly
> > monotonically increasing: it wraps around after 49.7 days.  From the
> > MSDN documentation at
> > http://msdn.microsoft.com/en-us/library/windows/desktop/ms724408%28v=vs.85%29.aspx:
> 
> That's correct, but a wraparound during the sleep should be well handled
> since they're all unsigned types.

What happens if GetTickCount returns a small value, after the
wraparound, while 'start' has a large value before the wraparound?
Subtracting the latter from the former will give a very large positive
value, right?

> Is your concern that we cannot detect if we end up sleeping for 50
> days and cannot detect that we wrapped twice?

No, my concern is if you start the sleep 49.7 days after the system
was started.

Reply via email to