allow larger timeouts
This commit is contained in:
@@ -117,8 +117,8 @@ result_t Device::recv(const long timeout, unsigned char& value)
|
|||||||
struct timespec tdiff;
|
struct timespec tdiff;
|
||||||
|
|
||||||
// set select timeout
|
// set select timeout
|
||||||
tdiff.tv_sec = 0;
|
tdiff.tv_sec = timeout/1000000;
|
||||||
tdiff.tv_nsec = timeout*1000;
|
tdiff.tv_nsec = (timeout%1000000)*1000;
|
||||||
|
|
||||||
#ifdef HAVE_PPOLL
|
#ifdef HAVE_PPOLL
|
||||||
int nfds = 1;
|
int nfds = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user