Re: Suggestions for my Linux app...?
- From: jasen <jasen@xxxxxxxxxxx>
- Date: 18 Jan 2007 19:22:19 GMT
On 2007-01-17, trashman.horlicks@xxxxxxxxxxxxxx <trashman.horlicks@xxxxxxxxxxxxxx> wrote:
Like this?
struct timeval tv;
tv.tv_sec = 0;
tv.tv_usec = 200000; /* 0.2 seconds */
select (0, NULL, NULL, NULL, &tv);
that'd work.
usleep(200000) would have the same effect.
nanosleep would be another option. (usleep is easier to use)
If it's for a server typically you use select and list put the FD of all the
sockets you're listening on in the readfds... and any with writes pending
in the writefds
Bye.
Jasen
.
- References:
- Suggestions for my Linux app...?
- From: Trev
- Re: Suggestions for my Linux app...?
- From: Joe Beanfish
- Re: Suggestions for my Linux app...?
- From: Kwebway Konongo
- Re: Suggestions for my Linux app...?
- From: Joe Beanfish
- Re: Suggestions for my Linux app...?
- From: trashman . horlicks
- Suggestions for my Linux app...?
- Prev by Date: aalib
- Next by Date: Re: Problem with named pipes and select
- Previous by thread: Re: Suggestions for my Linux app...?
- Next by thread: Re: Suggestions for my Linux app...?
- Index(es):
Relevant Pages
|