I commited a fix for this specific problem, as diagnosed by Maik. I will
look at Olaf's code later.

-Fred

Mathias Fröhlich wrote :
> Hi Fred,
>
> Before I check in that.
> I know Olaf has an improoved timestamping implementation for win32.
> Did he already send that to you?
>
>    Greetings
>
>          Mathias
>
> On Sunday 20 August 2006 16:44, Maik Justus wrote:
>   
>> Hi Matthias,
>>
>> Mathias Fröhlich wrote:
>>     
>>> Hi Maik,
>>>
>>> On Sunday 13 August 2006 21:15, Maik Justus wrote:
>>>       
>>>> I still have this problem. Can you tell me, where in the source the 10
>>>> seconds timeout are tested? Then I can try, to find more detailed
>>>> information.
>>>>         
>>> That would be great!
>>> That happens around line 420 in src/MultiPlayer/multiplaymgr.cxx.
>>>
>>>     Greetings
>>>
>>>            Mathias
>>>       
>> The problem is, that the elapsed time is queried in this way
>>
>>     
>>> long stamp = timestamper.get_seconds();
>>>       
>> but the timestamper update is calculated this way (file timestamp.cxx
>>
>> (simgear)):
>>     
>>> void SGTimeStamp::stamp() {
>>> #if defined( WIN32 ) && !defined(__CYGWIN__)
>>>     unsigned int t;
>>>     t = timeGetTime();
>>>     seconds = 0;    //<<<<<<<---------- comment by Maik:  this is the
>>> problem
>>>     usec =  t * 1000;
>>> #elif defined( HAVE_GETTIMEOFDAY )
>>>     struct timeval current;
>>>     struct timezone tz;
>>>     // sg_timestamp currtime;
>>>     gettimeofday(&current, &tz);
>>>     seconds = current.tv_sec;
>>>     usec = current.tv_usec;
>>> #elif defined( HAVE_GETLOCALTIME )
>>>     SYSTEMTIME current;
>>>     GetLocalTime(&current);
>>>     seconds = current.wSecond;
>>>     usec = current.wMilliseconds * 1000;
>>> #elif defined( HAVE_FTIME )
>>>     struct timeb current;
>>>     ftime(&current);
>>>     seconds = current.time;
>>>     usec = current.millitm * 1000;
>>> // -dw- uses time manager
>>> #elif defined( macintosh )
>>>     UnsignedWide ms;
>>>     Microseconds(&ms);
>>>
>>>     seconds = ms.lo / 1000000;
>>>     usec = ms.lo - ( seconds * 1000000 );
>>> #else
>>> # error Port me
>>> #endif
>>> }
>>>       
>> For MSVC the seconds are allways zero, all the elapsed time is stored in
>> usec. After splitting the elapsed time into usec and seconds and
>> removing the " #if defined( WIN32 ) && !defined(__CYGWIN__)" sections
>> alls seems
>> to work well (see enclosed diff for simgear). Please add it to CVS.
>>
>> Maik
>>     
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Flightgear-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>   


-- 
Frédéric Bouvier
http://frfoto.free.fr         Photo gallery - album photo
http://www.fotolia.fr/p/2278  Other photo gallery
http://fgsd.sourceforge.net/  FlightGear Scenery Designer



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to