On Tue, 2004-08-24 08:05:08 +0200, Francisco M. Marzoa Alonso wrote in message <200408240805.08811.fmmarzoa@softronica.org>: > >> TOut.tv_sec = Wait / 1000; > >> TOut.tv_usec = Wait % 1000; > > > >So "Wait" is in milli-seconds? That doesn't look correct, then:) > > > > TOut.tv_sec = Wait / 1000; > > TOut.tv_usec = (Wait % 1000) * 1000; > > Sure you're right, but this is a thing that I do not understand. I made a > function GetTickCount to emulate Window's one based on gettimeofday and see > that milliseconds on timeval structure can have values up to 999999 when I > expect to found a maximum value of 999 as there are only 1000 milliseconds in > a second. Notice, it's not "tv_msec" but "tv_usec", which is micro-seconde and not milli-seconds. A small 'u' is commonly used instead of the greek 'µ', because 'µ' won't be properly handled by all email clients, let alone in code to be compiled. MfG, JBG -- Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));