From: robertl Date: Mon, 1 Nov 2004 17:34:28 +0000 (+0000) Subject: On UNIX, there's no reason to spin on the select. Wait at least a character X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~11^2~3874 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2e728ee2d16ad5e40df4683c96cf6424368d7773;p=gpsbabel.git On UNIX, there's no reason to spin on the select. Wait at least a character time before looking again. --- diff --git a/gpsbabel/jeeps/gpsserial.c b/gpsbabel/jeeps/gpsserial.c index 1953500d2..b2a51bb22 100644 --- a/gpsbabel/jeeps/gpsserial.c +++ b/gpsbabel/jeeps/gpsserial.c @@ -456,7 +456,7 @@ int32 GPS_Serial_Chars_Ready(int32 fd) FD_SET(fd,&rec); t.tv_sec = 0; - t.tv_usec = 0; + t.tv_usec = 1000; (void) select(fd+1,&rec,NULL,NULL,&t); if(FD_ISSET(fd,&rec)) return 1;