> My debug function to log the timestamps was the culprit. I should 
> have just grabbed the time before, then the time after and done the 
> math. 

Using real time to calculate duration is very inefficient, it's much
better to use GetTickCount which is milliseconds running time since
Windows booted (wraps after 49 days).  The latest ICS V6 beta
OverbyteIcsFtpSrvT.pas unit has a number of timer and trigger related
functions using ticks that handle the 49 day wrap, they are now used in
the FTP client for timing sessions and responses.  

Beware GetTickCount is only accurate to about 15ms depending on OS, so
QueryPerformanceCounter is far more accurate, but with a slightly higher
overhead since it uses 64-bits instead of 32-bits. 

Angus
-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to