[Home] [Groups] - Message: [Prev in Group] [Next in Group]
19044: RE: [MUD-Dev] Re: TECH: Distributed Muds
[Full Header] [Plain Text]
From: "Derek Snider" <derek@idirect.com>
Newsgroups: nu.kanga.list.mud-dev
Date: Fri, 27 Apr 2001 13:14:34 -0400
References: [1]
Organization: Kanga.Nu
From Caliban Tiresias Darklock, April 27, 2001 12:22 AM
> On Thu, 26 Apr 2001 22:52:03 -0400, "Derek Snider" <derek@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@kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev