Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
select() ignoring timeval argument
I am new to this thread.
I am using select() in my code.
my code snippet:
twait.tv_sec = 0;
twait.tv_usec = THIRTY_MILLISECONDS;
pollfds2_count = select (0, readfds, writefds,exceptfds, &twait);
From one of the support forums i came to know that select() will return immediately even timeval parameter set to "non zero" or non NULL values. Am i correct? (They mentioned a possible bug in windows).
For our application to work correctly select should wait for THIRTY_MILLISECONDS.
How can i ensure that?
How sleep will help?
Please help me.