inputReady(): the time calculation for select() was wrong, forgetting
to multiply the milliseconds value by 1000 to get microseconds.
*/
maxfd = fd + 1;
tv.tv_sec = msecs / 1000;
*/
maxfd = fd + 1;
tv.tv_sec = msecs / 1000;
- tv.tv_usec = msecs % 1000;
+ tv.tv_usec = (msecs % 1000) * 1000;
while ((ready = select(maxfd, &rfd, NULL, NULL, &tv)) < 0 ) {
if (errno != EINTR ) {
while ((ready = select(maxfd, &rfd, NULL, NULL, &tv)) < 0 ) {
if (errno != EINTR ) {