PATCH: Microsecond sleep time

Stipe Tolj st at
Wed Jul 2 16:18:09 CEST 2008

Werner Coetzee schrieb:
> Hi
> Can anyone explain why gwthread is using the poll function to sleep (using milliseconds as timeout), and not maybe the select function (using microseconds as timeout)?
> We have the requirement to be able to sleep for less than a millisecond, which the current gwthread_sleep can't provide.
> Below is a patch to do just that, using the select function.
> I have tested it, so if anyone has any comments, please let me hear them.
> The diff is from our own SVN repository, but as far as I know, it is up-to-date with the cvs.

Hi Werner,

I'm +0 for applying the patch to CVS, since it's an additive feature and doesn't 
hurt any existing core bricks of the gwlib.

The calls should be POSIX.1 compliant and portable hence I guess.

Werner, could you do me a favor and resend the patch in a single file as mail 
attachment please. This ensures we don't get truncated end of line chars etc, 
which is a mess to correct by hand while patching ;)

And thanks a lot for contributing.


Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany system architecture      Kannel Software Foundation (KSF)    

mailto:st_{at}           mailto:stolj_{at}

More information about the devel mailing list