[MUD-Dev] Re: TECH: Distributed Muds

Derek Snider derek at idirect.com
Fri Apr 27 13:14:34 New Zealand Standard Time 2001


>From Caliban Tiresias Darklock, April 27, 2001 12:22 AM
> On Thu, 26 Apr 2001 22:52:03 -0400, "Derek Snider" <derek at idirect.com>
> wrote:
 
>> Why not use select() to delay?  
 
> Because select() is not a delay function. It's a network I/O
> function.  If you are not doing network I/O, use a different
> function -- sleep() comes to mind.
 
> It's a religious issue, though.

I know very well that select() is not a delay function, but as I said,
you can pass it a NULL descriptor set, and a timeval to delay with...
and it does no I/O, but delays for the specified time.

Sleep() is perfect if you want to sleep for a number of WHOLE SECONDS.
Usleep() isn't (or wasn't) very accurate.  If it was, people would be
using it instead of select(), no?

I've played with usleep() in the past, and it was far from accurate.
I haven't tested it out recently.

_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the MUD-Dev mailing list