Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2004:
[Freeciv-Dev] Re: (PR#8429) timeout setting
Home

[Freeciv-Dev] Re: (PR#8429) timeout setting

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: richih@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#8429) timeout setting
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Mon, 5 Apr 2004 09:27:34 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8429 >

On Mon, Apr 05, 2004 at 08:35:08AM -0700, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8429 >
> 
> 
> > I think you make this bigger than it is. How many complains did we got
> > "I set timeout to -1 and than it didn't work anymore".
> 
> Just 1, so far.
> 
> > The current
> > text reads:
> >
> >   If all players have not hit "Turn Done" before this time is up, then the
> >   turn ends automatically. Zero means there is no timeout. In DEBUG
> > servers, a
> >   timeout of -1 sets the autogame test mode. Use this with the command
> >   "timeoutincrease" to have a dynamic timer.
> >
> > A "test mode" is quite clearly not something like "production mode".
> 
> But it's enabled on production-mode servers!  The helptext is wrong!

What says that a "production mode" compilation can't have "test mode"
features?

> >> >> - Timeouts are measured with 1-second accuracy only.  Surely we
> >> should
> >> >> use the timer code for this...
> >> >
> >> > You want timeouts which fractions of a second? And why?
> >>
> >> No, I don't want a 0.1 second timeout.  I want a 4-second timeout to
> >> mean
> >> 4 seconds, not sometimes 3.2 and sometimes 4.9.
> >
> > Can you explain in more detail what is causing this?
> 
> Currently time() is used for the timeout.  This has a 1-second resolution.
>  So say we have a 4-second timeout.
> 
> - A particular turn starts at time 3.8.  time(NULL) => 3, so the turn ends
> at time 7.  At time 7.0 a packet is received and handled.  Now the turn
> ends.  It was 3.2 seconds long.
> 
> - A particular turn starts at time 7.0.  time(NULL) => 7, so the turn ends
> at time 11.  A few packets are handled at the start of the turn, putting
> us at time 7.9 (time() => 7 still).  Now a select() is called and told to
> wait for 4 seconds.  No packets are received and the select ends at 11.9. 
> The turn ends.  It was 4.9 seconds long.
> 
> This is simplified because I've ignored command-line (stdin) input.  But
> the concept is the same.  There is only a 1-second accuracy to turn length
> measurements.  This is not a big problem, but it is easily fixable by
> using the timer code.

I see and agree. But this IMHO not a big problem. It isn't unfair to
any player. It is just inaccurate in general.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Despite all the medical advances of the 20th century, the mortality 
  rate remains unchanged at 1 death per person."




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